Env variables from variants.yaml are not set for staging outputs
For the following recipe, I get the output
│ │ PKG_NAME:libgdal-core
│ │ CONDA_BUILD_SYSROOT:
│ │ PKG_NAME:libgdal-core
│ │ CONDA_BUILD_SYSROOT:/opt/MacOSX11.0.sdk
│ │ PKG_NAME:libgdal-core-devel
│ │ CONDA_BUILD_SYSROOT:/opt/MacOSX11.0.sdk
Note that CONDA_BUILD_SYSROOT is empty for the cache and the PKG_NAME is weirdly `libgdal-core`
recipe.yaml
```YAML
recipe:
name: libgdal-split
version: 3.21.3
outputs:
- staging:
name: core-build
requirements:
build:
- ${{ compiler('cxx') }}
build:
script: build
- package:
name: libgdal-core
inherit: core-build
requirements:
build:
- ${{ compiler('cxx') }}
build:
script: build
- package:
name: libgdal-core-devel
inherit: core-build
requirements:
build:
- ${{ compiler('cxx') }}
build:
script: build
```
build.sh
```bash
echo "PKG_NAME:${PKG_NAME}"
echo "CONDA_BUILD_SYSROOT:${CONDA_BUILD_SYSROOT}"
```
variants.yaml
```YAML
cxx_compiler:
- clangxx_impl
CONDA_BUILD_SYSROOT:
- "/opt/MacOSX11.0.sdk"
```
关闭于 2026-04-27 4 条评论