Description
Description
My project is a C extension. Of note it has no dependencies on any other package for building or testing.
To customize the github actions binary build I added a setup.cfg
to it with some additional options defined.
[build]
fetch = True
enable_all_extensions = True
enable = COLUMN_METADATA
This is causing an error when cibuildwheel is installing other packages because the current working directory is my project and my setup.cfg
is affecting their installation. In particular the fetch
option causes their installation to fail because they have no knowledge of it (and it is my option not theirs).
Here is an example of the problem occurring:
Installing build tools...
+ pip install --upgrade setuptools wheel -c 'C:\Program Files (x86)\pipx\.cache\f150de73f83b030\Lib\site-packages\cibuildwheel\resources\constraints-python36.txt'
Requirement already satisfied: setuptools in c:\users\runneradmin\appdata\local\temp\cibw-run-6rvfifu1\cp36-win32\build\venv\lib\site-packages (59.6.0)
Requirement already satisfied: wheel in c:\users\runneradmin\appdata\local\temp\cibw-run-6rvfifu1\cp36-win32\build\venv\lib\site-packages (0.37.1)
ERROR: Exception:
[ ... frames elided ...]
distutils.errors.DistutilsOptionError: error in setup.cfg: command 'build' has no such option 'fetch'
Error: Command ['pip', 'install', '--upgrade', 'setuptools', 'wheel', '-c', 'C:\\Program Files (x86)\\pipx\\.cache\\f150de73f83b030\\Lib\\site-packages\\cibuildwheel\\resources\\constraints-python36.txt'] failed with code 2. None
I did a second run where I changed the setup.cfg to not be present until just before the build so that it didn't affect the build packages being installed (using CIBW_BEFORE_BUILD). The test step then fell over:
Testing wheel...
+ pip install virtualenv -c /constraints.txt
ERROR: Exception:
[ ... frames elided ...]
distutils.errors.DistutilsOptionError: error in setup.cfg: command 'build' has no such option 'fetch'
I tried removing the setup.cfg in CIBW_BEFORE_TEST but that is run after the step above so it is too late.
This is the build log when CIBW_BEFORE_BUILD adds the setup.cfg so building works, but then falls over on the Testing wheel stage.
Suggested solutions:
- cibuildwheel should not have its current working directory be my project while installing things it wants
- add CIBW_AFTER_BUILD so I can delete the setup.cfg before test stuff is installed
Build log
https://github.com/rogerbinns/apsw/actions/runs/4844599878/jobs/8632966833
CI config
https://github.com/rogerbinns/apsw/actions/runs/4844599878/workflow