-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix python mod autoconf #1606
Fix python mod autoconf #1606
Conversation
src/mod/python.mod/configure.ac
Outdated
@@ -21,16 +21,14 @@ python_avail="false" | |||
|
|||
if test "x$egg_enable_python" != "xno"; then | |||
if test "x$egg_with_python_config" = "x"; then | |||
AC_PATH_PROGS([python_config_bin], [python3-config python-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config]) | |||
AC_PATH_PROGS([python_config_bin], [python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python3-config python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python-config]) |
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 add all these versions we aren't compatible with?
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.
idea is, to have a smaller diff to upstream ax autoconf macro, so that futrue updates to upstream are easy.
@@ -21,16 +21,14 @@ python_avail="false" | |||
|
|||
if test "x$egg_enable_python" != "xno"; then | |||
if test "x$egg_with_python_config" = "x"; then | |||
AC_PATH_PROGS([python_config_bin], [python3-config python-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config]) |
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.
it's a good thought to make future updates easier, but two things I see here- first, I think python3-config is usually a symlink to the current version, so searching for that first should prevent the scrolling of multiple failed searches
checking for python3.12-config... no
checking for python3.11-config... no
checking for python3.10-config... no
checking for python3.9-config... /usr/local/bin/python3.9-config
and also future-proof us for python3.13-config, etc.
And second, I think by adding the extra specific versions it may just keep going down the line until it finds an older version? I think I would be in favor of not making this (and the similar following) change at all.
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 was merily suggesting, to stick with upstream, but if you see more value in adopting it more to our liking, i can do those changes.
regarding "I think python3-config is usually a symlink". thats not the case with freebsd, which was the motivation for this PR.
for freebsd it is like:
$ ls -la /usr/local/bin/python*
-r-xr-xr-x 1 root wheel 4680 Apr 9 03:11 /usr/local/bin/python3.9
-r-xr-xr-x 1 root wheel 3153 Apr 9 03:11 /usr/local/bin/python3.9-config
So, shifting python3-config detection to the top would result in:
checking for python3-config... no
checking for python3.12-config... no
checking for python3.11-config... no
checking for python3.10-config... no
checking for python3.9-config... /usr/local/bin/python3.9-config
for the test system, a vanilla FreeBSD 14.1-RELEASE-p2
.
would you still like me to change it and shift detection of python3-config to the top of the test queue?
Changed as discussed in IRC (python-config should be first imho, and non-supported versions shouldn't be in there at all) Ready for review again. |
Found by: michaelortmann
Patch by: michaelortmann
Fixes: #1605
One-line summary:
Fix python mod autoconf
Additional description (if needed):
Several bugs are fixed by this PR. Now python.mod is also working for FreeBSD.
Please run misc/runautotools after merge
Test cases demonstrating functionality (if applicable):
Before:
After: