Skip to content

Commit 957409a

Browse files
orlitzkydimpase
authored andcommitted
build/pkgs/importlib_resources: skip with python >= 3.11
1 parent a65ad96 commit 957409a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
SAGE_SPKG_CONFIGURE([importlib_resources], [
22
SAGE_PYTHON_PACKAGE_CHECK([importlib_resources])
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_resources="no"
20+
],[
21+
AC_MSG_RESULT([no])
22+
])
323
])

0 commit comments

Comments
 (0)