From 7b39db6505d806b6d367657ec78f88b326bdffb7 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Thu, 16 May 2024 22:25:48 -0700 Subject: [PATCH] avoid cibw shlex mess on Linux config_settings --- .github/workflows/ci.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e62bc675..39fc2734 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -231,8 +231,6 @@ jobs: LD_LIBRARY_PATH=libyaml/src/.libs PYYAML_FORCE_CYTHON=1 PYYAML_FORCE_LIBYAML=1 - CIBW_CONFIG_SETTINGS: | - pyyaml_build_config={"force":1, "library_dirs": ["libyaml/src/.libs"], "include_dirs": ["libyaml/include"]} CIBW_TEST_COMMAND: cd {project}; pytest CIBW_TEST_REQUIRES: pytest run: | @@ -240,7 +238,13 @@ jobs: python3 -V python3 -m pip install -U --user ${{ matrix.cibw_version || 'cibuildwheel' }} - CIBW_BEFORE_BUILD="cp -r /host$(pwd)/libyaml {project} && ls -l {project}" python3 -m cibuildwheel --platform auto --output-dir ./dist ${{ steps.fetch_sdist.outputs.download-path }}/pyyaml*.tar.gz/pyyaml*.tar.gz + + cat << 'EOF' > build_config.toml + [tool.cibuildwheel.config-settings] + pyyaml_build_config='{"force":1, "library_dirs": ["libyaml/src/.libs"], "include_dirs": ["libyaml/include"]}' + EOF + + CIBW_BEFORE_BUILD="cp -r /host$(pwd)/libyaml {project} && ls -l {project}" python3 -m cibuildwheel --config-file $(pwd)/build_config.toml --platform auto --output-dir ./dist ${{ steps.fetch_sdist.outputs.download-path }}/pyyaml*.tar.gz/pyyaml*.tar.gz echo "artifact_name=$(ls ./dist/)" >> "$GITHUB_OUTPUT" # FIXME: ensure exactly one artifact