Skip to content

Commit 89e60a8

Browse files
author
Release Manager
committed
gh-41260: Fix --with-python option not being honored when cache exists When running ``./configure with --with-python=pythonX.Y``, if a previous configure run had cached a different Python path in ``ac_cv_path_PYTHON3``, the cached value would be used instead of re-checking the specified Python. This fix clears the cache variable when ``--with-python`` is explicitly specified, forcing configure to always check the specified Python. Fixes #41258 <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #41260 Reported by: Chenxin Zhong Reviewer(s): Dima Pasechnik
2 parents 0fc8ed5 + 3b917f3 commit 89e60a8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build/pkgs/python3/spkg-configure.m4

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ SAGE_SPKG_CONFIGURE([python3], [
1515
[AC_MSG_ERROR([building Sage --without-python is not supported])])
1616
ac_path_PYTHON3="$with_python"
1717
18+
dnl If --with-python was explicitly specified and differs from the cached value,
19+
dnl clear the cache to force re-checking.
20+
dnl This fixes issue #41258 where changing --with-python would use stale cached values
21+
AS_IF([test x"$ac_path_PYTHON3" != x && test x"$ac_path_PYTHON3" != x"$ac_cv_path_PYTHON3"], [
22+
AS_UNSET([ac_cv_path_PYTHON3])
23+
])
24+
1825
dnl Issue #30559: Removed the DEPCHECK for sqlite. We never use libsqlite3 from SPKG for anything
1926
dnl other than building the python3 SPKG; so our libsqlite3 cannot create shared library conflicts.
2027
dnl

0 commit comments

Comments
 (0)