summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/python/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/python/package.py')
-rw-r--r--var/spack/repos/builtin/packages/python/package.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index 513364e05e..3d3e955024 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -42,7 +42,7 @@ class Python(Package):
#: phase
install_targets = ["install"]
- build_targets = [] # type: List[str]
+ build_targets: List[str] = []
version("3.11.0", sha256="64424e96e2457abbac899b90f9530985b51eef2905951febd935f0e73414caeb")
version(
@@ -107,6 +107,13 @@ class Python(Package):
version("3.7.1", sha256="36c1b81ac29d0f8341f727ef40864d99d8206897be96be73dc34d4739c9c9f06")
version("3.7.0", sha256="85bb9feb6863e04fb1700b018d9d42d1caac178559ffa453d7e6a436e259fd0d")
+ # Python 3.6.15 has been added back only to allow bootstrapping Spack on Python 3.6
+ version(
+ "3.6.15",
+ sha256="54570b7e339e2cfd72b29c7e2fdb47c0b7b18b7412e61de5b463fc087c13b043",
+ deprecated=True,
+ )
+
extendable = True
# Variants to avoid cyclical dependencies for concretizer
@@ -226,7 +233,7 @@ class Python(Package):
conflicts("%nvhpc")
# Used to cache various attributes that are expensive to compute
- _config_vars = {} # type: Dict[str, Dict[str, str]]
+ _config_vars: Dict[str, Dict[str, str]] = {}
# An in-source build with --enable-optimizations fails for python@3.X
build_directory = "spack-build"
@@ -727,6 +734,12 @@ class Python(Package):
return Executable(path)
else:
+ # Give a last try at rhel8 platform python
+ if self.spec.external and self.prefix == "/usr" and self.spec.satisfies("os=rhel8"):
+ path = os.path.join(self.prefix, "libexec", "platform-python")
+ if os.path.exists(path):
+ return Executable(path)
+
msg = "Unable to locate {0} command in {1}"
raise RuntimeError(msg.format(self.name, self.prefix.bin))