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

Commit

Permalink
Merge #31318
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Mar 8, 2021
2 parents 92533b8 + 0fb8646 commit 8cd0bcc
Show file tree
Hide file tree
Showing 2 changed files with 16 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])
])
3 changes: 3 additions & 0 deletions src/doc/en/installation/source.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ rather than building a Python 3 installation from scratch.
Use the configure option ``--without-system-python3`` in case you want Python 3
built from scratch.

Sage will accept versions 3.6.x to 3.9.x; however, support for system python 3.6.x
is deprecated and will be removed in the next development cycle.

You can also use ``--with-python=/path/to/python3_binary`` to tell Sage to use
``/path/to/python3_binary`` to set up the venv. Note that setting up venv requires
a number of Python modules to be available within the Python in question. Currently,
Expand Down

0 comments on commit 8cd0bcc

Please sign in to comment.