bpo-45221: Fix handling of LDFLAGS and CPPFLAGS in setup.py #29031
Conversation
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 |
One small nit: the change also applies to flags in CPPFLAGS
as well.
@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 |
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 |
Looks like there's a trailing space after as
.
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 |
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 <andrei.avk@gmail.com>
|
|
This processing was removed in 09b2bec 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
The text was updated successfully, but these errors were encountered: