diff options
author | Robert Cohn <rscohn2@gmail.com> | 2021-06-14 13:47:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-14 10:47:44 -0700 |
commit | d993ee7972ff706056ee6d66afa47776eb3e72c6 (patch) | |
tree | 99f5d6edbe5a9982e83955d18cfe5c8127b6284a | |
parent | 22fe56ad2489eb242d5606dd55a19372b8721722 (diff) | |
download | spack-d993ee7972ff706056ee6d66afa47776eb3e72c6.tar.gz spack-d993ee7972ff706056ee6d66afa47776eb3e72c6.tar.bz2 spack-d993ee7972ff706056ee6d66afa47776eb3e72c6.tar.xz spack-d993ee7972ff706056ee6d66afa47776eb3e72c6.zip |
oneAPI packages: fix install for python2 (#24296)
Fix platform detection logic to work for Python 2 and 3
11 files changed, 22 insertions, 22 deletions
diff --git a/lib/spack/spack/build_systems/oneapi.py b/lib/spack/spack/build_systems/oneapi.py index 0844ff5d82..41e337cb70 100644 --- a/lib/spack/spack/build_systems/oneapi.py +++ b/lib/spack/spack/build_systems/oneapi.py @@ -9,7 +9,7 @@ import getpass import shutil -from sys import platform +import platform from os.path import basename, dirname, isdir from spack.package import Package @@ -48,7 +48,7 @@ class IntelOneApiPackage(Package): if installer_path is None: installer_path = basename(self.url_for_version(spec.version)) - if platform == 'linux': + if platform.system() == 'Linux': # Intel installer assumes and enforces that all components # are installed into a single prefix. Spack wants to # install each component in a separate prefix. The diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py index 3f4717bc5c..f204bb1f90 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ccl/package.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from sys import platform +import platform from spack import * @@ -17,7 +17,7 @@ class IntelOneapiCcl(IntelOneApiLibraryPackage): depends_on('intel-oneapi-mpi') - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.0', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17731/l_oneapi_ccl_p_2021.2.0.269_offline.sh', sha256='18b7875030243295b75471e235e91e5f7b4fc15caf18c07d941a6d47fba378d7', diff --git a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py index 6e7221fea9..85b047b4af 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-compilers/package.py @@ -6,7 +6,7 @@ import glob from os import path import subprocess -from sys import platform +import platform from spack import * @@ -21,7 +21,7 @@ class IntelOneapiCompilers(IntelOneApiPackage): depends_on('patchelf', type='build') - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.0', sha256='5d01cbff1a574c3775510cd97ffddd27fdf56d06a6b0c89a826fb23da4336d59', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17749/l_dpcpp-cpp-compiler_p_2021.2.0.118_offline.sh', diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py index b9e5cdd083..360a16f4c6 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dal/package.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from sys import platform +import platform from spack import * @@ -16,7 +16,7 @@ class IntelOneapiDal(IntelOneApiLibraryPackage): homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onedal.html' - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.0', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17747/l_daal_oneapi_p_2021.2.0.358_offline.sh', sha256='cbf4e64dbd21c10179f2d1d7e8b8b0f12eeffe6921602df33276cd0ebd1f8e34', diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py index 4808303083..3de28b05d2 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from sys import platform +import platform from spack import * @@ -16,7 +16,7 @@ class IntelOneapiDnn(IntelOneApiLibraryPackage): homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onednn.html' - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.0', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17751/l_onednn_p_2021.2.0.228_offline.sh', sha256='62121a3355298211a124ff4e71c42fc172bf1061019be6c6120830a1a502aa88', diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py index 5bdc8b17d6..42635081cd 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ipp/package.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from sys import platform +import platform from spack import * @@ -15,7 +15,7 @@ class IntelOneapiIpp(IntelOneApiLibraryPackage): homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html' - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.0', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17758/l_ipp_oneapi_p_2021.2.0.233_offline.sh', sha256='ccdfc81f77203822d80151b40ce9e8fd82bb2de85a9b132ceed12d24d3f3ff52', diff --git a/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py b/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py index 006b9cefbe..d3c6ddaebb 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-ippcp/package.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from sys import platform +import platform from spack import * @@ -16,7 +16,7 @@ class IntelOneapiIppcp(IntelOneApiLibraryPackage): homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html' - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.0', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17684/l_ippcp_oneapi_p_2021.2.0.231_offline.sh', sha256='64cd5924b42f924b6a8128a8bf8e686f5dc52b98f586ffac6c2e2f1585e3aba9', diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py index 5bc2629e02..91db1b579a 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mkl/package.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from sys import platform +import platform from spack import * @@ -16,7 +16,7 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage): homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html' - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.0', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17757/l_onemkl_p_2021.2.0.296_offline.sh', sha256='816e9df26ff331d6c0751b86ed5f7d243f9f172e76f14e83b32bf4d1d619dbae', diff --git a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py index 96f8ee0d15..ff66695085 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-mpi/package.py @@ -5,7 +5,7 @@ import subprocess -from sys import platform +import platform from spack import * @@ -18,7 +18,7 @@ class IntelOneapiMpi(IntelOneApiLibraryPackage): homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/mpi-library.html' - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.0', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17729/l_mpi_oneapi_p_2021.2.0.215_offline.sh', sha256='d0d4cdd11edaff2e7285e38f537defccff38e37a3067c02f4af43a3629ad4aa3', diff --git a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py index 726b3d57b1..910c300edf 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-tbb/package.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from sys import platform +import platform from spack import * @@ -16,7 +16,7 @@ class IntelOneapiTbb(IntelOneApiLibraryPackage): homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onetbb.html' - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.0', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17759/l_tbb_oneapi_p_2021.2.0.357_offline.sh', sha256='c1c3623c5bef547b30eac009e7a444611bf714c758d7472c114e9be9d5700eba', diff --git a/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py index b27088016a..f0ab170c5b 100644 --- a/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py +++ b/var/spack/repos/builtin/packages/intel-oneapi-vpl/package.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from sys import platform +import platform from spack import * @@ -15,7 +15,7 @@ class IntelOneapiVpl(IntelOneApiLibraryPackage): homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onevpl.html' - if platform == 'linux': + if platform.system() == 'Linux': version('2021.2.2', url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17733/l_oneVPL_p_2021.2.2.212_offline.sh', sha256='21106ba5cde22f3e31fd55280fbccf263508fa054030f12d5dff4a5379ef3bb7', |