Skip to content

Commit d271eb0

Browse files
committed
build/pkgs/exceptiongroup: skip if python >= 3.11
1 parent 8118c95 commit d271eb0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
SAGE_SPKG_CONFIGURE([exceptiongroup],[
2+
SAGE_PYTHON_PACKAGE_CHECK([exceptiongroup])
3+
],[
4+
# This is another backport package, but not one that is a direct
5+
# dependency of sagelib yet. Since it provides python-3.11 features,
6+
# it is superfluous when >=python-3.11 is being used. Here we test
7+
# for a python minor version component greater than or equal to 11,
8+
# and mark this package as "not required" if we succeed.
9+
#
10+
# See also: importlib_metadata, importlib_resources, typing_extensions
11+
#
12+
AC_MSG_CHECKING([for >=python-3.11])
13+
14+
# PYTHON_MINOR is exported by python's spkg-configure.m4
15+
AC_REQUIRE([SAGE_SPKG_CONFIGURE_PYTHON3])
16+
17+
AS_IF([test $PYTHON_MINOR -ge 11],[
18+
AC_MSG_RESULT([yes])
19+
sage_require_exceptiongroup=no
20+
],[
21+
AC_MSG_RESULT([no])
22+
])
23+
])
24+

0 commit comments

Comments
 (0)