Skip to content

Commit

Permalink
Remove crypt check for suitable Python
Browse files Browse the repository at this point in the history
Remove crypt from the list of modules that we try to import when
checking whether a given system python will work for our purposes,
since:
- It doesn't work on Windows (so it prevents us from running sagemath on
  Windows)
- Searching the entire repo doesn't find any uses of crypt
- crypt is deprecated anyways (PEP 594 has its removal scheduled for
  Python 3.13)

The check for crypt was added at the same time as the other modules
being checked, but neither the commit message for
6fcd7cd nor the discussion in
Trac sagemath#27824 mentions why crypt specifically was added (Most of the
relevant discussion in that ticket is about the distutils check).
  • Loading branch information
pranavrajpal committed Jun 19, 2023
1 parent 00128e9 commit c2734f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/pkgs/python3/spkg-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ fi
echo "Testing importing of various modules..."
import_errors=false
# Trac #31160: We no longer check for readline here.
test_modules="ctypes math hashlib crypt socket zlib sqlite3 ssl"
test_modules="ctypes math hashlib socket zlib sqlite3 ssl"
if [ "$UNAME" = "Darwin" ]; then
test_modules="$test_modules _scproxy"
fi
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/python3/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SAGE_SPKG_CONFIGURE([python3], [
dnl Check if we can do venv with a system python3
dnl instead of building our own copy.
dnl Trac #31160: We no longer check for readline here.
check_modules="sqlite3, ctypes, math, hashlib, crypt, socket, zlib, distutils.core, ssl, ensurepip"
check_modules="sqlite3, ctypes, math, hashlib, socket, zlib, distutils.core, ssl, ensurepip"
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

0 comments on commit c2734f9

Please sign in to comment.