Skip to content

Commit aef5d64

Browse files
scripts/test.py: fixed bug in manylinux cibuildwheel builds.
We were not including CIBW_BUILD in CIBW_ENVIRONMENT_PASS_LINUX.
1 parent c4a83ea commit aef5d64

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

scripts/test.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -929,10 +929,14 @@ def cibuildwheel(
929929
env_extra['CIBW_PYODIDE_VERSION'] = cibw_pyodide_version
930930
env_extra['CIBW_ENABLE'] = 'pyodide-prerelease'
931931

932-
# Pass all the environment variables we have set, to Linux
933-
# docker. Note that this will miss any settings in the original
934-
# environment.
935-
env_extra['CIBW_ENVIRONMENT_PASS_LINUX'] = ' '.join(sorted(env_extra.keys()))
932+
# Pass all the environment variables we have set, to Linux docker. Note
933+
# that this will miss any settings in the original environment. We have to
934+
# add CIBW_BUILD explicitly because we haven't set it yet.
935+
CIBW_ENVIRONMENT_PASS_LINUX = set(env_extra.keys())
936+
CIBW_ENVIRONMENT_PASS_LINUX.add('CIBW_BUILD')
937+
CIBW_ENVIRONMENT_PASS_LINUX = sorted(list(CIBW_ENVIRONMENT_PASS_LINUX))
938+
CIBW_ENVIRONMENT_PASS_LINUX = ' '.join(CIBW_ENVIRONMENT_PASS_LINUX)
939+
env_extra['CIBW_ENVIRONMENT_PASS_LINUX'] = CIBW_ENVIRONMENT_PASS_LINUX
936940

937941
if cibw_test_project:
938942
cibw_do_test_project(env_extra, CIBW_BUILD, cibw_pyodide, cibw_pyodide_args)

0 commit comments

Comments
 (0)