Skip to content

Commit a65ad96

Browse files
orlitzkydimpase
authored andcommitted
build/pkgs/importlib_metadata: skip with python >= 3.11
1 parent ab24b1c commit a65ad96

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
11
SAGE_SPKG_CONFIGURE([importlib_metadata], [
22
SAGE_PYTHON_PACKAGE_CHECK([importlib_metadata])
3+
],[
4+
# Three of our python packages are backport packages providing
5+
# python-3.11 features (see coding_in_python.rst):
6+
#
7+
# * importlib_metadata
8+
# * importlib_resources
9+
# * typing_extensions
10+
#
11+
# These packages are therefore not needed with >=python-3.11. Here
12+
# we test for a python minor version component greater than or equal
13+
# to 11, and mark this package as "not required" if we succeed.
14+
AC_MSG_CHECKING([for >=python-3.11])
15+
16+
# Keep in mind that False (~ zero) in python is success in the shell
17+
AS_IF(["${PYTHON_FOR_VENV}" -c "import sys; sys.exit(sys.version_info.minor < 11)"],[
18+
AC_MSG_RESULT([yes])
19+
sage_require_importlib_metadata="no"
20+
],[
21+
AC_MSG_RESULT([no])
22+
])
323
])
24+

0 commit comments

Comments
 (0)