-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-45221: Fix handling of LDFLAGS and CPPFLAGS in setup.py #29031
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
bpo-45221: Fix handling of LDFLAGS and CPPFLAGS in setup.py #29031
Conversation
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.
Alas, there are no explicit tests of setup.py. Thanks for the PR, it looks fine to me and appears to solve the problem which I can readily reproduce. Updated: oh, sorry, I just noticed that the NEWS blurb should mention CPPFLAGS as well.
Sounds good, thanks for testing it and reviewing! |
@@ -0,0 +1,3 @@ | |||
Fixed regression in handling of ``LDFLAGS`` options where |
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.
One small nit: the change also applies to flags in CPPFLAGS
as well.
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.
@ned-deily updated to mention CPPFLAGS
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
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.
Thanks for the PR and the update!
@@ -0,0 +1,3 @@ | |||
Fixed regression in handling of ``LDFLAGS`` and ``CPPFLAGS`` options | |||
where :meth:`argparse.parse_known_args` could interpret an option as |
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.
Looks like there's a trailing space after as
.
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.
pushed the fix...
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Looking over it again, it might be nice to retain the old comment that goes with the regex, updating it for argparse, something along the lines of:
Does that sound good? |
That looks good to me, thanks for taking the time to improve the PR. |
Thanks @akulakov for the PR, and @ned-deily for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
GH-29037 is a backport of this pull request to the 3.10 branch. |
…ythonGH-29031) (cherry picked from commit 6a533a4) Co-authored-by: andrei kulakov <[email protected]>
…up.py (GH-29031) (GH-29037) (cherry picked from commit 6a533a4) Co-authored-by: andrei kulakov <[email protected]> Automerge-Triggered-By: GH:ned-deily
|
|
This processing was removed in 09b2bece78f when replacing optparse with argparse, because argparse will already ignore unknown arguments here; but the line is still useful to avoid mistakenly parsing known args.
I couldn't find any tests for setup.py, I can work on a test if someone can point me to where they are located..
https://bugs.python.org/issue45221