-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CIBW_BEFORE_BUILD
: Changes do not propagate
#2084
Comments
Why you do not use pyproject.toml for define build dependencies? |
We are an old-style Python package and do not use pyproject.toml. Per the tool's documentation, pyproject.toml is not required (and, in fact, it is implied that |
Hm. The only change that I see and may have such impact is bumping pip version. However I see some successfull CI job with most recent cibuildwheel. |
I would highly recommend adding a pyproject.toml. That will allow you to declare you need these, so even SDist builds will benefit. Adding dependencies like cython and pybind11 is why pyproject.toml was developed in the first place. And every version of Python you support (3.8+) should have excellent pyproject.toml support. The only thing you need to watch out for is that setuptools no longer makes the current directory available by default with the modern build backend; if you need to import from the local directory (say to grab a helper), then you'll need to manipulate the path manually, as it's now considered an anti pattern. But otherwise, you should be able to drop a three-line pyproject.toml in and get started. It looks like you are getting isolated builds for some reason. Not sure why. It's just installing setuptools (since you don't have a pyproject.toml telling it what you do actually require) in an isolated environment. |
I see you added this in CI - is there a reason not to add it to repo and benefit anyone building an SDist? And you should not add What was the last version of cibuildwheel you were using? |
2.17 -> 2.18 is when this started happening. |
We stopped injecting setuptools and wheel in every environment in 2.18. If you add setuptools and wheel to the before-build libraries, it works. https://github.com/henryiii/pyomo/actions/runs/11865436281 I guess pip makes an isolated env of setuptools is missing? If you used pyproject.toml and put the cibw config there, I could have built these locally much faster. |
Thanks, we will try this. Re why we aren't using a |
If you shift with static metadata from setup.cfg to pyproject.toml you will use universal, not backend specific file format. The pyproject toml is widely supported by multiple tools, ex for project management. So doing such migration may benefit your users. |
You could remove your There is no backward compatibility issue. If you somehow had a version of pip that didn't support pyproject.toml but also did support Python 3.8, then it would just build the same as it does today. However, for any version that does support pyproject.toml, it will build more reliably since you no longer need anything preinstalled. Footnotes
|
Hi, all, |
Can't you set Something like: [tool.cibw.linux.environment]
PIP_NO_BINARY = "pysam" Or is that not what you meant? |
Description
We recently updated to 2.21.3 in order to start building Python 3.13 wheels for Pyomo. We have always utilized
CIBW_BEFORE_BUILD
to install some dependencies (pip install cython pybind11
), and that step ran; however, as soon as it attempted to actually build the wheels, a failure was hit because it could not findcython
andpybind11
.Build log
https://github.com/mrmundt/pyomo/actions/runs/11860593427/job/33056184668
CI config
https://github.com/mrmundt/pyomo/blob/ee0c2b39b9a6663cb33ffeb5fe2f4549ac60a04b/.github/workflows/release_wheel_creation.yml
The text was updated successfully, but these errors were encountered: