-
Notifications
You must be signed in to change notification settings - Fork 290
Description
Description
The evaluation of entries in [tool.cibuildwheel.environment]
or CIBW_ENVIRONMENT
occurs in order of appearence. So
[tool.cibuildwheel.environment]
FOO = "Hello $BAR"
BAR = "World"
results in FOO == "Hello ", rather than "Hello World". $BAR
is silently expanded to an empty string.
Discussion
I'm unsure whether this counts as a bug, or a a gotcha. The behaviour is consistent with a sequential execution model (e.g. Python code, Bash code), but not with a declarative model. Is [tool.cibuildwheel.environment]
mean to be thought of sequential steps?
If a bug I'm happy to attempt a PR that adds recursive/dependency driven evaluation.
If a gotcha then I'm happy to make a PR that adds documentation and/or a warning at runtime.
Reproduction
Rev moreati/lzma-cf@40a7b8e builds successfully.
Rev moreati/lzma-cf@b730b58 swaps the order of C_INCLUDE_PATH
and XZ_UTILS_PREFIX
resulting in C_INCLUDE_PATH == "/include:"
and a build failure
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/build-env-ckg9phoo/include -I/opt/_internal/cpython-3.10.18/include/python3.10 -c build/temp.linux-x86_64-cpython-310/lzma_cf._lzma_cffi.c -o build/temp.linux-x86_64-cpython-310/build/temp.linux-x86_64-cpython-310/lzma_cf._lzma_cffi.o
build/temp.linux-x86_64-cpython-310/lzma_cf._lzma_cffi.c:577:10: fatal error: lzma.h: No such file or directory
577 | #include <lzma.h>
| ^~~~~~~~
compilation terminated.
error: command '/opt/rh/gcc-toolset-14/root/usr/bin/gcc' failed with exit code 1
Build log
https://github.com/moreati/lzma-cf/actions/runs/18340269071/job/52233853421