Kozea / cairocffi

CFFI-based cairo bindings for Python.
https://doc.courtbouillon.org/cairocffi
BSD 3-Clause "New" or "Revised" License
208 stars 54 forks source link

Offline installation is not possible to due build script #215

Closed theCapypara closed 1 year ago

theCapypara commented 1 year ago

The build script added a pip install command. This breaks offline installation and also ignores any other setting passed to any parent pip command that was installing cairocffi in the first place.

https://github.com/Kozea/cairocffi/blob/b48a5b3776490ded8931dd8e0e92db91178ead5e/utils/build.py#L22

The reason it breaks is because even though the exception is caught, an Exception during the installation there means that cffi is not installed and then the exec_module a few lines later fails, causing the entire build to fail.

cairocffi should really not call pip inside of it's build script.

nanonyme commented 1 year ago

It sounds to me this is incorrect definition of build dependencies. This project should be declaring xcffib in https://github.com/Kozea/cairocffi/blob/b48a5b3776490ded8931dd8e0e92db91178ead5e/pyproject.toml#L2 rather than installing it manually with pip

liZe commented 1 year ago

This will be fixed by the in-line branch.