fix spack external find for Python >= 3.13 (#48170)
Python >= 3.13 does not have the crypt variant anymore. Still no matter if the test for crypt succeeds (which it can on Fedora providing its own crypt module for Python 3.13) or fails, it will add +crypt or ~crypt, which both fail because the variant only exists until Python 3.12. Co-authored-by: Richard Berger <rberger@lanl.gov>
This commit is contained in:
parent
da97e9eaa7
commit
250de0cdf2
@ -364,7 +364,7 @@ def determine_variants(cls, exes, version_str):
|
||||
variants += "~tix"
|
||||
|
||||
# Some modules are platform-dependent
|
||||
if sys.platform != "win32":
|
||||
if sys.platform != "win32" and Version(version_str) < Version("3.13"):
|
||||
try:
|
||||
python("-c", "import crypt", error=os.devnull)
|
||||
variants += "+crypt"
|
||||
|
Loading…
Reference in New Issue
Block a user