summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/perl/package.py27
-rw-r--r--var/spack/repos/builtin/packages/py-scipy/package.py9
-rw-r--r--var/spack/repos/builtin/packages/python/package.py4
3 files changed, 8 insertions, 32 deletions
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py
index 73471a382a..e049d58198 100644
--- a/var/spack/repos/builtin/packages/perl/package.py
+++ b/var/spack/repos/builtin/packages/perl/package.py
@@ -15,10 +15,10 @@ import os
import re
from contextlib import contextmanager
-from llnl.util import tty
from llnl.util.lang import match_predicate
from spack import *
+from spack.operating_systems.mac_os import macos_version
class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
@@ -297,24 +297,13 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
def setup_build_environment(self, env):
spec = self.spec
- # This is to avoid failures when using -mmacosx-version-min=11.1
- # since not all Apple Clang compilers support that version range
- # See https://eclecticlight.co/2020/07/21/big-sur-is-both-10-16-and-11-0-its-official/
- # It seems that this is only necessary for older versions of the
- # command line tools rather than the xcode/clang version.
- if spec.satisfies('os=bigsur'):
- pkgutil = Executable('pkgutil')
- output = pkgutil('--pkg-info=com.apple.pkg.CLTools_Executables',
- output=str, error=str, fail_on_error=False)
- match = re.search(r'version:\s*([0-9.]+)', output)
- if not match:
- tty.warn('Failed to detect macOS command line tools version: '
- + output)
- else:
- if Version(match.group(1)) < Version('12'):
- tty.warn("Setting SYSTEM_VERSION_COMPAT=1 due to older "
- "command line tools version")
- env.set('SYSTEM_VERSION_COMPAT', 1)
+ if (spec.version <= Version('5.34.0')
+ and spec.platform == 'darwin'
+ and macos_version() >= Version('10.16')):
+ # Older perl versions reject MACOSX_DEPLOYMENT_TARGET=11 or higher
+ # as "unexpected"; override the environment variable set by spack's
+ # platforms.darwin .
+ env.set('MACOSX_DEPLOYMENT_TARGET', '10.16')
# This is how we tell perl the locations of bzip and zlib.
env.set('BUILD_BZIP2', 0)
diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py
index 027de106d2..3df0b39318 100644
--- a/var/spack/repos/builtin/packages/py-scipy/package.py
+++ b/var/spack/repos/builtin/packages/py-scipy/package.py
@@ -3,9 +3,6 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import platform
-
-
class PyScipy(PythonPackage):
"""SciPy (pronounced "Sigh Pie") is a Scientific Library for Python.
It provides many user-friendly and efficient numerical routines such
@@ -104,12 +101,6 @@ class PyScipy(PythonPackage):
if self.spec.satisfies('@:1.4 %gcc@10:'):
env.set('FFLAGS', '-fallow-argument-mismatch')
- # Kluge to get the gfortran linker to work correctly on Big
- # Sur, at least until a gcc release > 10.2 is out with a fix.
- # (There is a fix in their development tree.)
- if platform.mac_ver()[0][0:2] == '11':
- env.set('MACOSX_DEPLOYMENT_TARGET', '10.15')
-
def install_options(self, spec, prefix):
args = []
if spec.satisfies('%fj'):
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index a9103aca6d..b22d745176 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -6,7 +6,6 @@
import glob
import json
import os
-import platform
import re
import sys
@@ -416,9 +415,6 @@ class Python(AutotoolsPackage):
'errors may occur when installing Python modules w/ '
'mixed C/C++ source files.').format(self.version))
- # Need this to allow python build to find the Python installation.
- env.set('MACOSX_DEPLOYMENT_TARGET', platform.mac_ver()[0])
-
env.unset('PYTHONPATH')
env.unset('PYTHONHOME')