-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k

Description
I have run into an issue with the deprecation of setup_requires
: the recommended alternative appears to be PEP 517/build-system.requires
, but that comes with its own issues:
-
apparently it breaks wheels unless you use special options likethis is wrong, my apologies--no-binary
. This breaks very common tools liketox
which no longer can install a project if this package is a dependency - also, why would you want to not have wheels? -
setup_requires
isn't installed when invokinghooks.get_requires_for_build_wheel()
as called by pip/pep517. However the newbuild-system.requires
is. In practice this is an issue when putting a Cython project as a build dependency for.pxd
imports: a.pxd
dep is only actually required when building the wheel (wheresetup_requires
will provide it) but not for basic package analysis (wherebuild-system.requires
per design provides it too,setup_requires won't
). In practice since "providing it" means building the whole package, as a result obtaining any package metadata is greatly slowed down -
pyproject.toml
sbuild-system.requires
is declarative but not exhaustive. the problem with that is that the dependencies are then spread over multiple places, e.g. no longer just requirements.txt parsed bysetup.py
- which can't be parsed similarly in the declarativepyproject.toml
file with its staticbuild_system.requires
Edit: a lot of this was initially quite misinformed so I corrected the reasons