From b6e2e731bcf98c738babfaa9531e0a9901a7610e Mon Sep 17 00:00:00 2001 From: "Tomoki, Karatsu" <49965247+t-karatsu@users.noreply.github.com> Date: Mon, 15 Feb 2021 03:22:48 +0900 Subject: py-numpy: check if execute commands are feasible. (#21507) * py-numpy: check if execute commands are feasible. * Apply patch to all versions. --- .../builtin/packages/py-numpy/check_executables.patch | 16 ++++++++++++++++ .../builtin/packages/py-numpy/check_executables2.patch | 16 ++++++++++++++++ .../builtin/packages/py-numpy/check_executables3.patch | 16 ++++++++++++++++ .../builtin/packages/py-numpy/check_executables4.patch | 16 ++++++++++++++++ .../builtin/packages/py-numpy/check_executables5.patch | 16 ++++++++++++++++ var/spack/repos/builtin/packages/py-numpy/package.py | 6 ++++++ 6 files changed, 86 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-numpy/check_executables.patch create mode 100644 var/spack/repos/builtin/packages/py-numpy/check_executables2.patch create mode 100644 var/spack/repos/builtin/packages/py-numpy/check_executables3.patch create mode 100644 var/spack/repos/builtin/packages/py-numpy/check_executables4.patch create mode 100644 var/spack/repos/builtin/packages/py-numpy/check_executables5.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-numpy/check_executables.patch b/var/spack/repos/builtin/packages/py-numpy/check_executables.patch new file mode 100644 index 0000000000..ee4ac1b45e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-numpy/check_executables.patch @@ -0,0 +1,16 @@ +--- numpy-1.20.0/numpy/distutils/fcompiler/__init__.py.org 2021-02-04 17:38:42.000000000 +0900 ++++ numpy-1.20.0/numpy/distutils/fcompiler/__init__.py 2021-02-04 18:29:21.000000000 +0900 +@@ -314,7 +314,12 @@ + if not exe_from_environ: + possibles = [f90, f77] + self.possible_executables + else: +- possibles = [exe_from_environ] + self.possible_executables ++ matching_executables = [] ++ for e in exe_from_environ: ++ for p in self.possible_executables: ++ if p in e: ++ matching_executables.append(e) ++ possibles = [matching_executables] + self.possible_executables + + seen = set() + unique_possibles = [] diff --git a/var/spack/repos/builtin/packages/py-numpy/check_executables2.patch b/var/spack/repos/builtin/packages/py-numpy/check_executables2.patch new file mode 100644 index 0000000000..0d0b78f647 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-numpy/check_executables2.patch @@ -0,0 +1,16 @@ +--- spack-src/numpy/distutils/fcompiler/__init__.py.orig 2021-01-04 15:16:38.000000000 +0900 ++++ spack-src/numpy/distutils/fcompiler/__init__.py 2021-02-12 17:20:07.327563118 +0900 +@@ -316,7 +316,12 @@ + if not exe_from_environ: + possibles = [f90, f77] + self.possible_executables + else: +- possibles = [exe_from_environ] + self.possible_executables ++ matching_executables = [] ++ for e in exe_from_environ: ++ for p in self.possible_executables: ++ if p in e: ++ matching_executables.append(e) ++ possibles = [matching_executables] + self.possible_executables + + seen = set() + unique_possibles = [] diff --git a/var/spack/repos/builtin/packages/py-numpy/check_executables3.patch b/var/spack/repos/builtin/packages/py-numpy/check_executables3.patch new file mode 100644 index 0000000000..078211e337 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-numpy/check_executables3.patch @@ -0,0 +1,16 @@ +--- spack-src/numpy/distutils/fcompiler/__init__.py.orig 2020-06-02 17:24:58.000000000 +0900 ++++ spack-src/numpy/distutils/fcompiler/__init__.py 2021-02-12 17:33:11.483728471 +0900 +@@ -320,7 +320,12 @@ + if not exe_from_environ: + possibles = [f90, f77] + self.possible_executables + else: +- possibles = [exe_from_environ] + self.possible_executables ++ matching_executables = [] ++ for e in exe_from_environ: ++ for p in self.possible_executables: ++ if p in e: ++ matching_executables.append(e) ++ possibles = [matching_executables] + self.possible_executables + + seen = set() + unique_possibles = [] diff --git a/var/spack/repos/builtin/packages/py-numpy/check_executables4.patch b/var/spack/repos/builtin/packages/py-numpy/check_executables4.patch new file mode 100644 index 0000000000..b553acb46f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-numpy/check_executables4.patch @@ -0,0 +1,16 @@ +--- spack-src/numpy/distutils/fcompiler/__init__.py.orig 2018-11-03 10:49:58.000000000 +0900 ++++ spack-src/numpy/distutils/fcompiler/__init__.py 2021-02-12 17:57:50.632263931 +0900 +@@ -318,7 +318,12 @@ + if not exe_from_environ: + possibles = [f90, f77] + self.possible_executables + else: +- possibles = [exe_from_environ] + self.possible_executables ++ matching_executables = [] ++ for e in exe_from_environ: ++ for p in self.possible_executables: ++ if p in e: ++ matching_executables.append(e) ++ possibles = [matching_executables] + self.possible_executables + + seen = set() + unique_possibles = [] diff --git a/var/spack/repos/builtin/packages/py-numpy/check_executables5.patch b/var/spack/repos/builtin/packages/py-numpy/check_executables5.patch new file mode 100644 index 0000000000..4ae9fe4009 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-numpy/check_executables5.patch @@ -0,0 +1,16 @@ +--- spack-src/numpy/distutils/fcompiler/__init__.py.orig 2017-09-29 13:31:46.000000000 +0900 ++++ spack-src/numpy/distutils/fcompiler/__init__.py 2021-02-12 18:06:12.001479417 +0900 +@@ -322,7 +322,12 @@ + if not exe_from_environ: + possibles = [f90, f77] + self.possible_executables + else: +- possibles = [exe_from_environ] + self.possible_executables ++ matching_executables = [] ++ for e in exe_from_environ: ++ for p in self.possible_executables: ++ if p in e: ++ matching_executables.append(e) ++ possibles = [matching_executables] + self.possible_executables + + seen = set() + unique_possibles = [] diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 2c8a7d5659..1c0c222885 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -106,6 +106,12 @@ class PyNumpy(PythonPackage): patch('add_fj_compiler3.patch', when='@1.14.0:1.18.5%fj') patch('add_fj_compiler4.patch', when='@:1.13.3%fj') + patch('check_executables.patch', when='@1.20.0:') + patch('check_executables2.patch', when='@1.19.0:1.19.5') + patch('check_executables3.patch', when='@1.16.0:1.18.5') + patch('check_executables4.patch', when='@1.14.0:1.15.4') + patch('check_executables5.patch', when='@:1.13.3') + # GCC 4.8 is the minimum version that works conflicts('%gcc@:4.7', msg='GCC 4.8+ required') -- cgit v1.2.3-70-g09d2