Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 2c60025

Browse files
author
Matthias Koeppe
committed
m4/sage_check_python_for_venv.m4: Warn if python3 is misconfigured like it is currently in homebrew
1 parent 9d686f2 commit 2c60025

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

m4/sage_check_python_for_venv.m4

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,11 @@ modules = list((Extension("config_check_distutils_cxx", list(("conftest.cpp",)),
107107
setup(name="config_check_distutils_cxx", ext_modules=modules)
108108
exit(0)
109109
EOF
110-
AS_IF([CC="$CC" CXX="$CXX" conftest_venv/bin/python3 conftest.py --verbose build --build-base=conftest.dir >& AS_MESSAGE_LOG_FD 2>&1 ],
111-
[COMMANDS_IF_GOOD], [
110+
AS_IF([CC="$CC" CXX="$CXX" conftest_venv/bin/python3 conftest.py --verbose build --build-base=conftest.dir >& AS_MESSAGE_LOG_FD 2>&1 ], [
111+
AS_IF([[conftest_venv/bin/python3 -m sysconfig | grep '^\sw*\(C[PX]*\|LD\)FLAGS *=.*[" ]-[IL]' ]] [>& AS_MESSAGE_LOG_FD 2>&1 ], [
112+
AC_MSG_WARN([this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see https://trac.sagemath.org/ticket/31132])
113+
])
114+
COMMANDS_IF_GOOD], [
112115
AC_MSG_RESULT([no, the version is in the supported range, and the modules can be imported, but distutils cannot build a C++ 11 extension])
113116
])
114117
], [

0 commit comments

Comments
 (0)