question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please consider undeprecating setup_requires

See original GitHub issue

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 like --no-binary. This breaks very common tools like tox which no longer can install a project if this package is a dependency - also, why would you want to not have wheels? this is wrong, my apologies

  • setup_requires isn’t installed when invoking hooks.get_requires_for_build_wheel() as called by pip/pep517. However the new build-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 (where setup_requires will provide it) but not for basic package analysis (where build-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.tomls build-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 by setup.py - which can’t be parsed similarly in the declarative pyproject.toml file with its static build_system.requires

Edit: a lot of this was initially quite misinformed so I corrected the reasons

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:23 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
McSinyxcommented, Jan 25, 2020

Thanks, that should be officially documented elsewhere, but that’s out of the scope of this issue I guess.

1reaction
Hierosmecommented, Oct 29, 2021

For me it type of breakout is not a good news. Like Python 2 to 3, it have take almost 10 years for back to reality. That it not the first time where a PEP is totaly worng.

The PEP in question transform something it have been simple during years by something totaly strange, with nobody it have experience, and no clear documentation.

I not understand that need to break the work of world developper’s.

My point is: Please consider to limit the negative impact of it type a change. I’m not sure maintain a Alias will be the end of the world.

Regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why you shouldn't invoke setup.py directly - Paul Ganssle
This does not mean that setuptools itself is deprecated, or that using setup.py to configure your package builds is going to be removed....
Read more >
Dependencies Management in Setuptools
In previous versions of setuptools , this used to be accomplished with the setup_requires keyword but is now considered deprecated in favor of...
Read more >
python - How to write setup.py to include a Git repository as a ...
Apparently setup.py is being deprecated (although my guess is it'll be around for awhile) and setup.cfg is the new thing. [metadata] name = ......
Read more >
setuptools-scm - PyPI
cfg usage (deprecated). as setup_requires is deprecated in favour of pyproject.toml usage in setup.cfg is considered deprecated, please use ...
Read more >
How to Package Python dependencies with PIP setuptools
If you get a permissions error, instead of using sudo, consider creating ... Example of Install_requires with Platform Specific Dependencies.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found