Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/pkgs/python3/spkg-configure.m4: Issue a deprecation warning for…
Browse files Browse the repository at this point in the history
… system python 3.6
  • Loading branch information
mkoeppe committed Feb 1, 2021
1 parent fc8b676 commit 6ef52d6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions build/pkgs/python3/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
SAGE_SPKG_CONFIGURE([python3], [
m4_pushdef([MIN_VERSION], [3.6.0])
m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.7.0])
m4_pushdef([LT_VERSION], [3.10.0])
AC_ARG_WITH([python],
[AS_HELP_STRING([--with-python=PYTHON3],
[Python 3 executable to use for the Sage venv; default: python3])])
Expand All @@ -20,8 +23,6 @@ SAGE_SPKG_CONFIGURE([python3], [
dnl Check if we can do venv with a system python3
dnl instead of building our own copy.
check_modules="sqlite3, ctypes, math, hashlib, crypt, readline, socket, zlib, distutils.core"
m4_pushdef([MIN_VERSION], [3.6.0])
m4_pushdef([LT_VERSION], [3.10.0])
AC_CACHE_CHECK([for python3 >= ]MIN_VERSION[, < ]LT_VERSION[ with modules $check_modules], [ac_cv_path_PYTHON3], [
AS_IF([test x"$ac_path_PYTHON3" != x], [dnl checking explicitly specified $with_python
AC_MSG_RESULT([])
Expand Down Expand Up @@ -66,8 +67,6 @@ SAGE_SPKG_CONFIGURE([python3], [
AC_MSG_NOTICE([to try to use a different system python, use ./configure --with-python=/path/to/python])
sage_spkg_install_python3=yes
])
m4_popdef([MIN_VERSION])
m4_popdef([LT_VERSION])
])
],, [
dnl PRE
Expand Down Expand Up @@ -98,6 +97,12 @@ SAGE_SPKG_CONFIGURE([python3], [
CFLAGS_MARCH=""
])
])
AX_COMPARE_VERSION([$python3_version], [lt], MIN_NONDEPRECATED_VERSION, [
AC_MSG_NOTICE([deprecation notice: Support for system python < MIN_NONDEPRECATED_VERSION is deprecated
and will be removed in the next development cycle. Consider using a newer version of Python
that may be available on your system or can be installed using the system package manager.
To build Sage with a different system python, use ./configure --with-python=/path/to/python])
])
], [
SAGE_MACOSX_DEPLOYMENT_TARGET=legacy
])
Expand All @@ -109,4 +114,8 @@ SAGE_SPKG_CONFIGURE([python3], [
dnl (that a bunch of other checks do) from emitting warnings about
dnl conftest.dir and conftest_venv being directories.
rm -rf conftest.dir conftest_venv
m4_popdef([MIN_VERSION])
m4_popdef([MIN_NONDEPRECATED_VERSION])
m4_popdef([LT_VERSION])
])

0 comments on commit 6ef52d6

Please sign in to comment.