Problem description
Problem
When using the pixi-build-rattler-build backend to build a package, or multiple packages using multi-outputs mode, the package version must be duplicated between pixi.toml and recipe.yml.
Currently the only option is to hardcode it in the recipe context as version is mandatory in the recipe file:
# recipe.yml
context:
version: 0.1.0 # duplicated from pixi.toml
In some cases, this creates two sources of truth that must be kept in sync manually :
Expected behavior
The pixi-build-rattler-build backend should expose the package version defined in pixi.toml as an environment variable (e.g. PIXI_PACKAGE_VERSION) so that recipes can reference it without duplication:
Suggested solution
As mentioned in the community discussion on discord, pixi-build could inject the version (from pixi.toml ?) as an environment variable before invoking rattler-build, similar to how $PREFIX, $BUILD_PREFIX, etc. are already injected.
Problem description
Problem
When using the
pixi-build-rattler-buildbackend to build a package, or multiple packages using multi-outputs mode, the package version must be duplicated betweenpixi.tomlandrecipe.yml.Currently the only option is to hardcode it in the recipe context as version is mandatory in the recipe file:
In some cases, this creates two sources of truth that must be kept in sync manually :
Expected behavior
The
pixi-build-rattler-buildbackend should expose the package version defined inpixi.tomlas an environment variable (e.g.PIXI_PACKAGE_VERSION) so that recipes can reference it without duplication:Suggested solution
As mentioned in the community discussion on discord,
pixi-buildcould inject the version (frompixi.toml?) as an environment variable before invokingrattler-build, similar to how$PREFIX,$BUILD_PREFIX, etc. are already injected.