-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Please consider undeprecating setup_requires #1742
Comments
EDIT FROM THE FUTURE: this part is somewhat irrelevant because I just accidentally broke something (so fully my mistake for the distraction, apologies 🙈 ) jump down here for remaining issue: #1742 (comment)
Edit 2: most of this was wrong, hence the correction 😄 |
The alternative to |
It would help if you provided a reproducible example of the issue you are running into. |
Assuming the issue is with your nettools package, using https://github.com/JonasT/nettools/archive/a8b9236f985d468e49953f818dad3dcb1bbe2b77.zip with an added minimal [build-system]
requires = ["setuptools", "wheel", "cython"] That is |
Note that setuptools won't include
|
Yes that message appears if you use it in a dep that itself is a build requires dep of your main project in tox.
Edit from way later: the message appeared because my package was broken 😄 apologies from future me
|
Again, can you point to a reproducible example? |
I'll try to.
Edit 2: (I just had a broken package. Realized why later, see below!) |
The exact error I believe was this @ tox/wheel: |
@benoit-pierre Okay, so my MANIFEST.in was wrong and this lead to problems!
But I suppose my ticket here wasn't that constructive given the wheel thing was just wrong, Edit: unintentional comment spam from my side (sorry again 😬 ) ends with this comment of my past self, next comment explains true issue more in-depth |
For what it's worth, I discovered using PEP518 (
This is a problem because it slows down obtaining basic package metadata greatly if you put in a build dependency that builds slowly. And many I'm therefore reopening, and suggesting |
@Jonast Could you provide a minimal example case that can be used to reproduce the issue you're reporting here? |
@Jonast it does not help anyone if you comment at multiple locations for reporting the same issue - especially multiple times. You are reaching (mostly) the same folks on all those channels. To keep track of everything that's been discussed, I need to look at 2 Discourse threads and at least 3 issues spread across 3 repositories. Could you please keep the discussion in one place, so that your issue and all possible options are all discussed in one place? That would make life easier for the project maintainers. I'm gonna take the liberty to say that this issue is fine to have further discussion -- I'm happy to defer to setuptools maintainers to tell us a better place. |
@pradyunsg I know this is off-topic, but since I did get multiple remarks like this over the last few days I would like to say something about it: It can be super complicated to find the right place when not understanding yet what even the problem is. I try to make the best guess but from the outside the packaging ecosystem is really difficult to get a grasp on, so I will be almost inevitably wrong. When someone points out the correct place or I realize a discussion is actually indicating a bug that needs a ticket, I try my best to figure out where this actually should be and correct things. I also try to always refer to the next place, but I may simply mess things up because I usually report for much simpler projects involving no such "moves". I am therefore hoping you won't hold any grudges and that you'll be forgiving also to people coming after me, because it is more difficult than it may look like 🤷♀️ my apologies and please have some mercy, we're not all as intimately familiar with things as you are! That would certainly help sometimes 😄 Sorry, I did actually forget about the example. This is a common way my
Put the above
This is also the approach https://github.com/kivy/python-for-android uses, and due to the |
Yep, I empathize with you here. This stuff can be pretty complicated so it is perfectly okay to be wrong. :)
I didn't mean to come across as harsh (apologies if I came across as that) and I'm definitely not holding grudges. 🙈 As someone who's been trying to understand what exactly your issue is, I was mostly just suggesting this since it was getting a little difficult to keep track up with how this conversation was evolving.
Yep yep, I noticed. It'll be easier to point folks from other channels to chime in at a single "broad" place (like I've tried to do with this issue now). That way, it's easier for everyone to keep track of the discussion and the conversation can branch/flow as needed on a single platform and it's easier for everyone who has interest in the discussion can see how things evolved. We definitely need to improve the situation with our communication channels to make them easier for new contributors. (btw, I do want to take inputs from you on how we could improve things for this, but let's do that elsewhere) Thanks for the example! That should help us here. :) |
Comment from the peanut gallery: |
@Juanlu001 first of all yeah that's really a nitpick, the main problem is the exploding package analysis time as illustrated in the example above. (which normally doesn't matter much, but is a huge problem with python-for-android because it causes 5-15 minutes additional build time which is massive) All the others are just nitpicks, but I felt it made sense to list them all for a full picture As for the unsupported syntax, for me the problem is really the reverse: I'd like to use PEP 508 URLs and |
I just decided to check for some more real world numbers, and in my current build for checking the deps of 7 packages, I just measured and I lose 13 minutes doing this. I'm pretty sure if there was a way to avoid compiling the cython deps just to examine a package I'd be going through that part in under a minute. So the time loss really is quite massive... 😢 This is on a first-gen AMD zen hexacore, so it's not the slowest machine ever |
Where was it stated that |
@McSinyx #1320 (comment) (also, some remarks about it here: #1784 ) |
Thanks, that should be officially documented elsewhere, but that's out of the scope of this issue I guess. |
Regarding the performance issue, I think there are two strategies:
Setuptools won't be undeprecating setup_requires and I'm actively working to make more visible the deprecation and remove the functionality. |
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. 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: Regards |
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 downpyproject.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
The text was updated successfully, but these errors were encountered: