diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2023-08-13 20:47:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-13 21:47:47 -0400 |
commit | 151c55178151865530c5624386fbd926f4eee0f4 (patch) | |
tree | 3366efefadd203518e60d75843774b1335f00ade | |
parent | abbd1abc1a265a1dc4bb8e3adb48ce1bf717bcb0 (diff) | |
download | spack-151c55178151865530c5624386fbd926f4eee0f4.tar.gz spack-151c55178151865530c5624386fbd926f4eee0f4.tar.bz2 spack-151c55178151865530c5624386fbd926f4eee0f4.tar.xz spack-151c55178151865530c5624386fbd926f4eee0f4.zip |
Python: fix Apple Clang +optimizations build (#39412)
-rw-r--r-- | var/spack/repos/builtin/packages/python/package.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index ab8e6f310f..73ed03e282 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -308,7 +308,7 @@ class Python(Package): conflicts("%nvhpc") # https://bugs.python.org/issue45405 - conflicts("@:3.7.2,3.8.0:3.8.12,3.9.0:3.9.10,3.10.0:3.10.2", when="%apple-clang@13:") + conflicts("@:3.7.12,3.8.0:3.8.12,3.9.0:3.9.7,3.10.0", when="%apple-clang@13:") # See https://github.com/python/cpython/issues/106424 # datetime.now(timezone.utc) segfaults @@ -435,6 +435,11 @@ class Python(Package): if spec.satisfies("%gcc") or spec.satisfies("%fj"): env.unset("LC_ALL") + # https://github.com/python/cpython/issues/87275 + if spec.satisfies("@:3.9.5 +optimizations %apple-clang"): + xcrun = Executable("/usr/bin/xcrun") + env.set("LLVM_AR", xcrun("-find", "ar", output=str).strip()) + def flag_handler(self, name, flags): # python 3.8 requires -fwrapv when compiled with intel if self.spec.satisfies("@3.8: %intel"): |