-
-
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
Don't install setup_requires when run as a PEP-517 backend. #2306
Conversation
Under PEP-517, installing build dependencies is up to the frontend. Closes pypagh-2303
@@ -380,7 +380,7 @@ def test_setup_requires(self, setup_literal, requirements, use_wheel, | |||
setup( | |||
name="qux", | |||
version="0.0.0", | |||
py_modules=["hello.py"], | |||
py_modules=["hello"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test was failing locally without it. All the other samples in this file with py_modules
don't have the .py
extension, and the packaging guide says it doesn't belong there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm.. It's disturbing that the tests are currently passing if they fail for you locally without that change, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they may have been passing on master and only failed when I made the change I was interested in. As this seemed like a simple mistake and nothing else was failing, I confess I didn't try to understand what was happening.
I'm inclined to accept this change, especially since it brings the codebase one step closer to fully deprecating setup_requires. You've flagged the change not as |
The build dependencies are reported to the frontend which is responsible for installing them in a build environment. You can disable that, e.g. with the So I don't believe that this breaks any scenario which is meant to work. But as with any change, someone could have relied on something that wasn't meant to work. For instance:
Would you prefer that I called that |
Based on that description, I'm inclined to say it's not a breaking change. Thanks for adding that detail so those that are affected can understand better the context. |
Released as 49.5. |
Thanks Jason! |
Summary of changes
Under PEP 517, installing build dependencies is up to the frontend.
setup_requires
are already reported as build dependencies, but setuptools should not attempt to install them itself when used as a PEP 517 backend.Closes #2303
Pull Request Checklist