From 89b57929f2f999b2f9d7628b4fdfae3d3bfd6122 Mon Sep 17 00:00:00 2001 From: Sebastian Schmitt Date: Fri, 9 Jul 2021 04:42:26 +0200 Subject: [PATCH 001/289] Update pox (#24635) * Update pox * Add build and run --- var/spack/repos/builtin/packages/py-pox/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pox/package.py b/var/spack/repos/builtin/packages/py-pox/package.py index ca2debbd75b..b9d1bcd628f 100644 --- a/var/spack/repos/builtin/packages/py-pox/package.py +++ b/var/spack/repos/builtin/packages/py-pox/package.py @@ -12,18 +12,20 @@ class PyPox(PythonPackage): homepage = "https://github.com/uqfoundation/pox" pypi = "pox/pox-0.2.5.tar.gz" + version('0.3.0', sha256='cb968350b186466bb4905a21084587ec3aa6fd7aa0ef55d416ee0d523e2abe31') version('0.2.5', sha256='2b53fbdf02596240483dc2cb94f94cc21252ad1b1858c7b1c151afeec9022cc8') version('0.2.3', sha256='d3e8167a1ebe08ae56262a0b9359118d90bc4648cd284b5d10ae240343100a75') version('0.2.2', sha256='c0b88e59ef0e4f2fa4839e11bf90d2c32d6ceb5abaf01f0c8138f7558e6f87c1') version('0.2.1', sha256='580bf731fee233c58eac0974011b5bf0698efb7337b0a1696d289043b4fcd7f4') - depends_on('python@2.5:2.8,3.1:') + depends_on('python@2.5:2.8,3.1:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.6:', when='@0.3.0:', type=('build', 'run')) depends_on('py-setuptools@0.6:', type='build') def url_for_version(self, version): url = "https://pypi.io/packages/source/p/pox/" - if version >= Version('0.2.4'): + if Version('0.3.0') > version >= Version('0.2.4'): url += 'pox-{0}.tar.gz' else: url += 'pox-{0}.zip' From 4c3005673e526aa6f8da25ee74a8ea229facd3a3 Mon Sep 17 00:00:00 2001 From: Nic McDonald Date: Fri, 9 Jul 2021 02:54:14 -0600 Subject: [PATCH 002/289] abseil-cpp: add cxxstd variant (#24577) --- .../repos/builtin/packages/abseil-cpp/package.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/abseil-cpp/package.py b/var/spack/repos/builtin/packages/abseil-cpp/package.py index 0bf28861a74..f58e6af372e 100644 --- a/var/spack/repos/builtin/packages/abseil-cpp/package.py +++ b/var/spack/repos/builtin/packages/abseil-cpp/package.py @@ -31,8 +31,14 @@ class AbseilCpp(CMakePackage): conflicts('+shared', when='@:20190808') + variant('cxxstd', values=('11', '14', '17', '20'), default='11', + description="C++ standard used during compilation") + def cmake_args(self): - args = ["-DBUILD_TESTING=OFF", "-DCMAKE_CXX_STANDARD=11"] - args.append('-DBUILD_SHARED_LIBS:Bool={0}'.format( - 'ON' if '+shared' in self.spec else 'OFF')) - return args + shared = 'ON' if '+shared' in self.spec else 'OFF' + cxxstd = self.spec.variants['cxxstd'].value + return [ + self.define('BUILD_TESTING', 'OFF'), + self.define('BUILD_SHARED_LIBS:Bool', shared), + self.define('CMAKE_CXX_STANDARD', cxxstd) + ] From 57a9fb7610452f50e561d31692386307a786b4ba Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Fri, 9 Jul 2021 01:55:06 -0700 Subject: [PATCH 003/289] flux: add latest tagged releases (#24687) flux-core v0.21 requires jansson 2.10+ For more details, see: https://github.com/flux-framework/flux-core/commit/a6086e021ee9bf869663bc475d4311dc540486fe --- var/spack/repos/builtin/packages/flux-core/package.py | 2 ++ var/spack/repos/builtin/packages/flux-sched/package.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/flux-core/package.py b/var/spack/repos/builtin/packages/flux-core/package.py index 2593b184acb..71357bdabd4 100644 --- a/var/spack/repos/builtin/packages/flux-core/package.py +++ b/var/spack/repos/builtin/packages/flux-core/package.py @@ -17,6 +17,7 @@ class FluxCore(AutotoolsPackage): maintainers = ['SteVwonder'] version('master', branch='master') + version('0.28.0', sha256='9a784def7186b0036091bd8d6d8fe5bc3425ab2927e1465e1c9ad266631c285d') version('0.27.0', sha256='abd46d38081ba6b501adb1c111374b39d6ae72ac1aec9fbbf31943a856541d3a') version('0.26.0', sha256='58bfd4742c59364b13cd83214e8f70735952d01793800b149cae056fddfeeff1') version('0.25.0', sha256='3c97e21eaec51e8aa0eaee6aa8eb23246650d102a6b6a5c9943cd69e3c8e1008') @@ -56,6 +57,7 @@ class FluxCore(AutotoolsPackage): depends_on("py-pyyaml") depends_on("py-jsonschema") depends_on("jansson") + depends_on("jansson@2.10:", when="@0.21.0:") depends_on("pkgconfig") depends_on("yaml-cpp") depends_on("lz4") diff --git a/var/spack/repos/builtin/packages/flux-sched/package.py b/var/spack/repos/builtin/packages/flux-sched/package.py index 9fa525cf6e0..6378cb044f2 100644 --- a/var/spack/repos/builtin/packages/flux-sched/package.py +++ b/var/spack/repos/builtin/packages/flux-sched/package.py @@ -17,6 +17,7 @@ class FluxSched(AutotoolsPackage): maintainers = ['SteVwonder'] version('master', branch='master') + version('0.17.0', sha256='5acfcb757e2294a92eaa91be58ba9b42736b88b42d2937de4a78f4642b1c4933') version('0.16.0', sha256='08313976161c141b9b34e2d44d5a08d1b11302e22d60aeaf878eef84d4bd2884') version('0.15.0', sha256='ff24d26997f91af415f98734b8117291f5a5001e86dac865b56b3d72980c80c8') version('0.14.0', sha256='2808f42032b917823d69cd26103c9238694416e2f30c6d39c11c670927ed232a') @@ -46,6 +47,7 @@ class FluxSched(AutotoolsPackage): depends_on("flux-core@0.22.0", when='@0.14.0', type=('build', 'run', 'link')) depends_on("flux-core@0.23.0:0.25.99", when='@0.15.0', type=('build', 'run', 'link')) depends_on("flux-core@0.26.0:", when='@0.16.0', type=('build', 'run', 'link')) + depends_on("flux-core@0.28.0:", when='@0.17.0', type=('build', 'run', 'link')) depends_on("flux-core@master", when='@master', type=('build', 'run', 'link')) # Need autotools when building on master: From 3fb5c139836d3602fa07091b62ae94ec4b4feb21 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Fri, 9 Jul 2021 04:57:37 -0400 Subject: [PATCH 004/289] googletest: add v1.11 and "live at head", keep v1.10 the default (#24290) Ideally a test-only dependency won't be in the build, but until then mark the requirement of gtest up to 1.10. See e4s job failure at https://gitlab.spack.io/spack/spack/-/jobs/349959 . Looks like 1.11 introduces some breaking incompatibilities, so perhaps we should transition later. --- .../repos/builtin/packages/faodel/package.py | 24 +++++++++++-------- .../builtin/packages/googletest/package.py | 5 +++- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/faodel/package.py b/var/spack/repos/builtin/packages/faodel/package.py index 56e14951413..047ea718759 100644 --- a/var/spack/repos/builtin/packages/faodel/package.py +++ b/var/spack/repos/builtin/packages/faodel/package.py @@ -37,7 +37,7 @@ class Faodel(CMakePackage): depends_on('hdf5+mpi', when='+hdf5+mpi') depends_on('hdf5~mpi', when='+hdf5~mpi') depends_on('libfabric@1.5.3:', when='network=libfabric') - depends_on('googletest@1.7.0:', type='build') + depends_on('googletest@1.7.0:1.10', type='test') # FAODEL requires C++11 support which starts with gcc 4.8.1 conflicts('%gcc@:4.8.0') @@ -62,20 +62,24 @@ class Faodel(CMakePackage): def cmake_args(self): spec = self.spec + build_tests = self.run_tests and '+mpi' in spec + args = [ self.define_from_variant('BUILD_SHARED_LIBS', 'shared'), - self.define_from_variant('BUILD_TESTS', 'mpi'), - '-DBOOST_ROOT:PATH={0}'.format(spec['boost'].prefix), - '-DGTEST_ROOT:PATH={0}'.format(spec['googletest'].prefix), - '-DBUILD_DOCS:BOOL=OFF', + self.define('BOOST_ROOT', spec['boost'].prefix), + self.define('BUILD_DOCS', False), + self.define('BUILD_TESTS', build_tests), self.define_from_variant('Faodel_ENABLE_IOM_HDF5', 'hdf5'), # self.define_from_variant('Faodel_ENABLE_IOM_LEVELDB', 'leveldb'), self.define_from_variant('Faodel_ENABLE_MPI_SUPPORT', 'mpi'), self.define_from_variant('Faodel_ENABLE_TCMALLOC', 'tcmalloc'), - '-DFaodel_LOGGING_METHOD:STRING={0}'.format( - spec.variants['logging'].value), - '-DFaodel_NETWORK_LIBRARY:STRING={0}'.format( - spec.variants['network'].value), - self.define_from_variant('Faodel_ENABLE_CEREAL', 'cereal') + self.define_from_variant('Faodel_LOGGING_METHOD', 'logging'), + self.define_from_variant('Faodel_NETWORK_LIBRARY', 'network'), + self.define_from_variant('Faodel_ENABLE_CEREAL', 'cereal'), ] + if build_tests: + args.extend([ + self.define('GTEST_ROOT', spec['googletest'].prefix) + ]) + return args diff --git a/var/spack/repos/builtin/packages/googletest/package.py b/var/spack/repos/builtin/packages/googletest/package.py index 7690ec0170c..f6fa0d28945 100644 --- a/var/spack/repos/builtin/packages/googletest/package.py +++ b/var/spack/repos/builtin/packages/googletest/package.py @@ -10,8 +10,11 @@ class Googletest(CMakePackage): """Google test framework for C++. Also called gtest.""" homepage = "https://github.com/google/googletest" url = "https://github.com/google/googletest/tarball/release-1.10.0" + git = "https://github.com/google/googletest" - version('1.10.0', sha256='e4a7cd97c903818abe7ddb129db9c41cc9fd9e2ded654be57ced26d45c72e4c9') + version('master', branch='master') + version('1.11.0', sha256='07b0896360f8e14414a8419e35515da0be085c5b4547c914ab8f4684ef0a3a8e') + version('1.10.0', sha256='e4a7cd97c903818abe7ddb129db9c41cc9fd9e2ded654be57ced26d45c72e4c9', preferred=True) version('1.8.1', sha256='8e40a005e098b1ba917d64104549e3da274e31261dedc57d6250fe91391b2e84') version('1.8.0', sha256='d8c33605d23d303b08a912eaee7f84c4e091d6e3d90e9a8ec8aaf7450dfe2568') version('1.7.0', sha256='9639cf8b7f37a4d0c6575f52c01ef167c5f11faee65252296b3ffc2d9acd421b') From eff7f20118a3334fede8d8aff506afa98f7ec5de Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 9 Jul 2021 02:52:23 -0700 Subject: [PATCH 005/289] mypy: move configuration to pyproject.toml (#24802) This moves our `mypy` configuration from `.mypy.ini` to `.pyproject.toml` and increases the minimum `mypy` version in the tests. - [x] move `mypy` configuration to `pyproject.toml` - [x] remove `.mypy.ini` - [x] ensure that `mypy` version .900 or higher is used in tests --- .github/workflows/unit_tests.yaml | 4 +-- .mypy.ini | 35 ------------------------ pyproject.toml | 44 +++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 37 deletions(-) delete mode 100644 .mypy.ini diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 365716c02a3..b454c7d935e 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -39,7 +39,7 @@ jobs: python-version: 3.9 - name: Install Python packages run: | - pip install --upgrade pip six setuptools flake8 isort>=4.3.5 mypy>=0.800 black types-six + pip install --upgrade pip six setuptools flake8 isort>=4.3.5 mypy>=0.900 black types-six - name: Setup git configuration run: | # Need this for the git tests to succeed. @@ -370,7 +370,7 @@ jobs: run: | pip install --upgrade pip six setuptools pip install --upgrade codecov coverage - pip install --upgrade flake8 isort>=4.3.5 mypy>=0.800 + pip install --upgrade flake8 isort>=4.3.5 mypy>=0.900 - name: Setup Homebrew packages run: | brew install dash fish gcc gnupg2 kcov diff --git a/.mypy.ini b/.mypy.ini deleted file mode 100644 index 4257b1bd3fb..00000000000 --- a/.mypy.ini +++ /dev/null @@ -1,35 +0,0 @@ -[mypy] -python_version = 3.7 -files=lib/spack/llnl/**/*.py,lib/spack/spack/**/*.py -mypy_path=bin,lib/spack,lib/spack/external,var/spack/repos/builtin -# This and a generated import file allows supporting packages -namespace_packages=True -# To avoid re-factoring all the externals, ignore errors and missing imports -# globally, then turn back on in spack and spack submodules -ignore_errors=True -ignore_missing_imports=True - -[mypy-spack.*] -ignore_errors=False -ignore_missing_imports=False - -[mypy-packages.*] -ignore_errors=False -ignore_missing_imports=False - -[mypy-llnl.*] -ignore_errors=False -ignore_missing_imports=False - -[mypy-spack.test.packages] -ignore_errors=True - -# ignore errors in fake import path for packages -[mypy-spack.pkg.*] -ignore_errors=True -ignore_missing_imports=True - -# jinja has syntax in it that requires python3 and causes a parse error -# skip importing it -[mypy-jinja2] -follow_imports=skip diff --git a/pyproject.toml b/pyproject.toml index fc8dd4e428e..74b7ec8e1e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,3 +12,47 @@ known_archspec = "archspec" known_llnl = "llnl" src_paths = "lib" honor_noqa = true + +[tool.mypy] +python_version = 3.7 +files = ['lib/spack/llnl/**/*.py', 'lib/spack/spack/**/*.py'] +mypy_path = ['bin', 'lib/spack', 'lib/spack/external', 'var/spack/repos/builtin'] + +# This and a generated import file allows supporting packages +namespace_packages = true + +# To avoid re-factoring all the externals, ignore errors and missing imports +# globally, then turn back on in spack and spack submodules +ignore_errors = true +ignore_missing_imports = true + +[[tool.mypy.overrides]] +module = 'spack.*' +ignore_errors = false +ignore_missing_imports = false + +[[tool.mypy.overrides]] +module = 'packages.*' +ignore_errors = false +ignore_missing_imports = false + +[[tool.mypy.overrides]] +module = 'llnl.*' +ignore_errors = false +ignore_missing_imports = false + +[[tool.mypy.overrides]] +module = 'spack.test.packages' +ignore_errors = true + +# ignore errors in fake import path for packages +[[tool.mypy.overrides]] +module = 'spack.pkg.*' +ignore_errors = true +ignore_missing_imports = true + +# jinja has syntax in it that requires python3 and causes a parse error +# skip importing it +[[tool.mypy.overrides]] +module = 'jinja2' +follow_imports = 'skip' From 5b5f99bbd4d3a6538796aedc2dfae091e87d8b4d Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 9 Jul 2021 02:53:04 -0700 Subject: [PATCH 006/289] WarpX: add v21.07 (#24800) --- var/spack/repos/builtin/packages/py-warpx/package.py | 3 ++- var/spack/repos/builtin/packages/warpx/package.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-warpx/package.py b/var/spack/repos/builtin/packages/py-warpx/package.py index 9d0a9607bec..0936da9b2f4 100644 --- a/var/spack/repos/builtin/packages/py-warpx/package.py +++ b/var/spack/repos/builtin/packages/py-warpx/package.py @@ -25,6 +25,7 @@ class PyWarpx(PythonPackage): # NOTE: if you update the versions here, also see warpx version('develop', branch='development') + version('21.07', sha256='a8740316d813c365715f7471201499905798b50bd94950d33f1bd91478d49561') version('21.06', sha256='a26039dc4061da45e779dd5002467c67a533fc08d30841e01e7abb3a890fbe30') version('21.05', sha256='f835f0ae6c5702550d23191aa0bb0722f981abb1460410e3d8952bc3d945a9fc') version('21.04', sha256='51d2d8b4542eada96216e8b128c0545c4b7527addc2038efebe586c32c4020a0') @@ -32,7 +33,7 @@ class PyWarpx(PythonPackage): variant('mpi', default=True, description='Enable MPI support') - for v in ['21.05', '21.04', 'develop']: + for v in ['21.07', '21.06', '21.05', '21.04', 'develop']: depends_on('warpx@{0}'.format(v), when='@{0}'.format(v), type=['build', 'link']) diff --git a/var/spack/repos/builtin/packages/warpx/package.py b/var/spack/repos/builtin/packages/warpx/package.py index 3150e2b9800..368308a2b12 100644 --- a/var/spack/repos/builtin/packages/warpx/package.py +++ b/var/spack/repos/builtin/packages/warpx/package.py @@ -17,13 +17,14 @@ class Warpx(CMakePackage): """ homepage = "https://ecp-warpx.github.io" - url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/21.04.tar.gz" + url = "https://github.com/ECP-WarpX/WarpX/archive/refs/tags/21.07.tar.gz" git = "https://github.com/ECP-WarpX/WarpX.git" maintainers = ['ax3l', 'dpgrote', 'MaxThevenet', 'RemiLehe'] # NOTE: if you update the versions here, also see py-warpx version('develop', branch='development') + version('21.07', sha256='a8740316d813c365715f7471201499905798b50bd94950d33f1bd91478d49561') version('21.06', sha256='a26039dc4061da45e779dd5002467c67a533fc08d30841e01e7abb3a890fbe30') version('21.05', sha256='f835f0ae6c5702550d23191aa0bb0722f981abb1460410e3d8952bc3d945a9fc') version('21.04', sha256='51d2d8b4542eada96216e8b128c0545c4b7527addc2038efebe586c32c4020a0') From 0b9b3f6f79fffdfe4a499d3561695fd2fd17af6d Mon Sep 17 00:00:00 2001 From: Robert Cohn Date: Fri, 9 Jul 2021 05:56:02 -0400 Subject: [PATCH 007/289] intel-oneapi-dpl: new package (#24793) --- .../packages/intel-oneapi-dpl/package.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py new file mode 100644 index 00000000000..fa027629890 --- /dev/null +++ b/var/spack/repos/builtin/packages/intel-oneapi-dpl/package.py @@ -0,0 +1,37 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +import platform + +from spack import * + + +class IntelOneapiDpl(IntelOneApiLibraryPackage): + """Intel oneAPI DPL.""" + + maintainers = ['rscohn2', 'danvev'] + + homepage = 'https://github.com/oneapi-src/oneDPL' + + if platform.system() == 'Linux': + version('2021.4.0', + url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17889/l_oneDPL_p_2021.4.0.337_offline.sh', + sha256='540ef0d308c4b0f13ea10168a90edd42a56dc0883024f6f1a678b94c10b5c170', + expand=False) + + @property + def component_dir(self): + return 'dpl' + + @property + def headers(self): + include_path = join_path(self.component_path, 'linux', 'include') + headers = find_headers('*', include_path, recursive=True) + # Force this directory to be added to include path, even + # though no files are here because all includes are relative + # to this path + headers.directories = [include_path] + return headers From 94e5c1d078355fea7140ec81e6cb32e2eabf0188 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 9 Jul 2021 04:58:51 -0500 Subject: [PATCH 008/289] py-pyrsistent: need link dep on python (#24788) --- var/spack/repos/builtin/packages/py-pyrsistent/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-pyrsistent/package.py b/var/spack/repos/builtin/packages/py-pyrsistent/package.py index 72708b8fab5..5bf81eb4c96 100644 --- a/var/spack/repos/builtin/packages/py-pyrsistent/package.py +++ b/var/spack/repos/builtin/packages/py-pyrsistent/package.py @@ -16,6 +16,6 @@ class PyPyrsistent(PythonPackage): version('0.15.7', sha256='cdc7b5e3ed77bed61270a47d35434a30617b9becdf2478af76ad2c6ade307280') - depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.5:', type=('build', 'link', 'run')) depends_on('py-setuptools', type='build') depends_on('py-six', type=('build', 'run')) From d8f655159a0c9694df40b467c912d91310db585a Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:52:59 +0200 Subject: [PATCH 009/289] py-jinja2: add 3.0.1 and +i18n variant (#24767) --- var/spack/repos/builtin/packages/py-jinja2/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-jinja2/package.py b/var/spack/repos/builtin/packages/py-jinja2/package.py index 73e073aa1bf..9367d18aa99 100644 --- a/var/spack/repos/builtin/packages/py-jinja2/package.py +++ b/var/spack/repos/builtin/packages/py-jinja2/package.py @@ -14,6 +14,7 @@ class PyJinja2(PythonPackage): homepage = "https://palletsprojects.com/p/jinja/" pypi = "Jinja2/Jinja2-2.10.3.tar.gz" + version('3.0.1', sha256='703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4') version('2.11.3', sha256='a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6') version('2.10.3', sha256='9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de') version('2.10.1', sha256='065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013') @@ -25,7 +26,12 @@ class PyJinja2(PythonPackage): version('2.7.1', sha256='5cc0a087a81dca1c08368482fb7a92fe2bdd8cfbb22bc0fccfe6c85affb04c8b') version('2.7', sha256='474f1518d189ae7e318b139fecc1d30b943f124448cfa0f09582ca23e069fa4d') + variant('i18n', default=False, description="Enables I18N support with Babel") + + depends_on('python@3.6:', when='@3:', type=('build', 'run')) depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') + depends_on('py-markupsafe@2.0:', when='@3:', type=('build', 'run')) depends_on('py-markupsafe@0.23:', type=('build', 'run')) - depends_on('py-babel@0.8:', type=('build', 'run')) # optional, required for i18n + depends_on('py-babel@2.7:', when='@3:+i18n', type=('build', 'run')) + depends_on('py-babel@0.8:', when='+i18n', type=('build', 'run')) From bbd80e5cf3a2a7abd047d03cb6e83b21efce5fe9 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:53:13 +0200 Subject: [PATCH 010/289] py-jupyter-core: add v4.7.1 (#24768) --- var/spack/repos/builtin/packages/py-jupyter-core/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-jupyter-core/package.py b/var/spack/repos/builtin/packages/py-jupyter-core/package.py index 647d86b1259..88b7c8e8af4 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-core/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-core/package.py @@ -12,6 +12,7 @@ class PyJupyterCore(PythonPackage): homepage = "http://jupyter-core.readthedocs.io/" pypi = "jupyter-core/jupyter_core-4.6.0.tar.gz" + version('4.7.1', sha256='79025cb3225efcd36847d0840f3fc672c0abd7afd0de83ba8a1d3837619122b4') version('4.6.3', sha256='394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e') version('4.6.1', sha256='a183e0ec2e8f6adddf62b0a3fc6a2237e3e0056d381e536d3e7c7ecc3067e244') version('4.6.0', sha256='85103cee6548992780912c1a0a9ec2583a4a18f1ef79a248ec0db4446500bce3') @@ -27,7 +28,9 @@ class PyJupyterCore(PythonPackage): version('4.0.1', sha256='7c165f7de7a063596f8be1bcfc86e9ba6897e38baf24e8510514690963600122') version('4.0.0', sha256='9025208cdfc40718c7e3ab62b5e17aacf68e3fc66e34ff21fe032d553620122a') + depends_on('python@3.6:', when='@4.7:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.5:', when='@4.6.2:', type=('build', 'run')) depends_on('python@2.7:2.8,3.3:', type=('build', 'run')) - depends_on('python@2.7:2.8,3.5:', type=('build', 'run'), when='@4.6.2:') depends_on('py-setuptools', when='@4.5.0:', type=('build', 'run')) depends_on('py-traitlets', type=('build', 'run')) + # additional pywin32>=1.0 dependency for windows From 451f484c9a25bc3a5732b0aca5c856a3a188bd3c Mon Sep 17 00:00:00 2001 From: holrock Date: Fri, 9 Jul 2021 19:53:37 +0900 Subject: [PATCH 011/289] ruby: add v3.0.2 (#24771) --- var/spack/repos/builtin/packages/ruby/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index b8ff3c3aa13..c0deb2d5b32 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -15,6 +15,7 @@ class Ruby(AutotoolsPackage): list_url = "http://cache.ruby-lang.org/pub/ruby/" list_depth = 1 + version('3.0.2', sha256='5085dee0ad9f06996a8acec7ebea4a8735e6fac22f22e2d98c3f2bc3bef7e6f1') version('3.0.1', sha256='369825db2199f6aeef16b408df6a04ebaddb664fb9af0ec8c686b0ce7ab77727') version('3.0.0', sha256='a13ed141a1c18eb967aac1e33f4d6ad5f21be1ac543c344e0d6feeee54af8e28') version('2.7.2', sha256='6e5706d0d4ee4e1e2f883db9d768586b4d06567debea353c796ec45e8321c3d4') From 85b49f115f8ae1cc5fd26e52f1ff8c67894cbbbb Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:57:20 +0200 Subject: [PATCH 012/289] py-anyio: add new package (#24765) --- .../builtin/packages/py-anyio/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-anyio/package.py diff --git a/var/spack/repos/builtin/packages/py-anyio/package.py b/var/spack/repos/builtin/packages/py-anyio/package.py new file mode 100644 index 00000000000..c7838e82287 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-anyio/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyAnyio(PythonPackage): + """High level compatibility layer for multiple asynchronous event loop + implementations.""" + + homepage = "https://github.com/agronholm/anyio" + pypi = "anyio/anyio-3.2.1.tar.gz" + + version('3.2.1', sha256='07968db9fa7c1ca5435a133dc62f988d84ef78e1d9b22814a59d1c62618afbc5') + + depends_on('python@3.6.2:', type=('build', 'run')) + depends_on('py-setuptools@42:', type='build') + depends_on('py-setuptools-scm+toml@3.4:', type='build') + depends_on('py-async-generator', when='^python@:3.6.999', type=('build', 'run')) + depends_on('py-dataclasses', when='^python@:3.6.999', type=('build', 'run')) + depends_on('py-idna@2.8:', type=('build', 'run')) + depends_on('py-sniffio@1.1:', type=('build', 'run')) + depends_on('py-typing-extensions', when='^python@:3.7.999', type=('build', 'run')) From 83d0e20ae8f96dd6e5a1c5324051f767d5715a3b Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:57:32 +0200 Subject: [PATCH 013/289] py-requests-unixsocket: add new package (#24764) --- .../py-requests-unixsocket/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-requests-unixsocket/package.py diff --git a/var/spack/repos/builtin/packages/py-requests-unixsocket/package.py b/var/spack/repos/builtin/packages/py-requests-unixsocket/package.py new file mode 100644 index 00000000000..f8e3fee7b1c --- /dev/null +++ b/var/spack/repos/builtin/packages/py-requests-unixsocket/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyRequestsUnixsocket(PythonPackage): + """Use requests to talk HTTP via a UNIX domain socket.""" + + homepage = "https://github.com/msabramo/requests-unixsocket" + pypi = "requests-unixsocket/requests-unixsocket-0.2.0.tar.gz" + + version('0.2.0', sha256='9e5c1a20afc3cf786197ae59c79bcdb0e7565f218f27df5f891307ee8817c1ea') + + depends_on('py-setuptools', type='build') + depends_on('py-requests@1.1:', type=('build', 'run')) + depends_on('py-urllib3@1.8:', type=('build', 'run')) From 01ca429c9ac75f21304c9a3e5700a08dd4bf64cb Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:57:45 +0200 Subject: [PATCH 014/289] py-tornado: add v6.1 (#24753) --- .../builtin/packages/py-tornado/package.py | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-tornado/package.py b/var/spack/repos/builtin/packages/py-tornado/package.py index b6ac7cfc635..8a827392503 100644 --- a/var/spack/repos/builtin/packages/py-tornado/package.py +++ b/var/spack/repos/builtin/packages/py-tornado/package.py @@ -9,20 +9,21 @@ class PyTornado(PythonPackage): """Tornado is a Python web framework and asynchronous networking library.""" - homepage = "https://github.com/tornadoweb/tornado" - url = "https://github.com/tornadoweb/tornado/archive/v6.0.3.tar.gz" - version('6.0.3', sha256='a97ac3b8c95867e534b48cb6fbbf156f5ca5b20c423bb06894c17b240d7a18fc') - version('5.1.1', sha256='a1da335a2978b9a8c3544cab10076d799442d7988ed0b4f2be035fe4388ca8dd') - version('4.4.0', sha256='ae556a0848e5d428d00597a18b38b9ca9d20f4600535e1dd33b3a576ab234194') + homepage = "https://github.com/tornadoweb/tornado" + pypi = "tornado/tornado-6.1.tar.gz" + + version('6.1', sha256='33c6e81d7bd55b468d2e793517c909b139960b6c790a60b7991b9b6b76fb9791') + version('6.0.3', sha256='c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9') + version('5.1.1', sha256='4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409') + version('4.4', sha256='3176545b6cb2966870db4def4f646da6ab7a0c19400576969c57279a7561ab02') depends_on('py-setuptools', type='build') - # requirements from setup.py - depends_on('python@3.5:', when='@6:', type=('build', 'run')) + depends_on('python@3.5.2:', when='@6:', type=('build', 'run')) depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) depends_on('py-backports-ssl-match-hostname', when='@:4 ^python@:2.7.8', type=('build', 'run')) - depends_on('py-singledispatch', when='^python@:3.3', type=('build', 'run')) + depends_on('py-singledispatch', when='@:5.99 ^python@:3.3', type=('build', 'run')) depends_on('py-certifi', when='@:4 ^python@:3.3', type=('build', 'run')) - depends_on('py-backports-abc@0.4:', when='^python@:3.4', type=('build', 'run')) - depends_on('py-futures', when='@5: ^python@:3.1', type=('build', 'run')) + depends_on('py-backports-abc@0.4:5.99', when='^python@:3.4', type=('build', 'run')) + depends_on('py-futures', when='@5:5.99 ^python@:3.1', type=('build', 'run')) From de8d4e9d9a9c8338389781de640457353308b787 Mon Sep 17 00:00:00 2001 From: Michele Mesiti Date: Fri, 9 Jul 2021 13:02:26 +0200 Subject: [PATCH 015/289] sombrero: add v2021-07-08, deprecate v1.0 (#24782) --- .../repos/builtin/packages/sombrero/package.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/sombrero/package.py b/var/spack/repos/builtin/packages/sombrero/package.py index c834df6134f..8e117a1e2cb 100644 --- a/var/spack/repos/builtin/packages/sombrero/package.py +++ b/var/spack/repos/builtin/packages/sombrero/package.py @@ -12,15 +12,25 @@ class Sombrero(MakefilePackage): "A next-generation conjugate gradient benchmark from computational particle physics" homepage = "https://github.com/sa2c/sombrero" - url = "https://github.com/sa2c/sombrero/archive/refs/tags/1.0.tar.gz" + url = "https://github.com/sa2c/sombrero/archive/refs/tags/1.0.tar.gz" - version('1.0', sha256='423a631c86f0e5f14dea186228871099ca0374dc07bf1bb24b6be17f79784682') + version('2021-07-08', + sha256='816b0f0a684a421fa620f11c21649ac162e85d1febd6a7e10cfd07604760c0d6') + + # Version 1 is incompatible with spack + # as CFLAGS and the like are hardcoded in the makefile. + version('1.0', + sha256='423a631c86f0e5f14dea186228871099ca0374dc07bf1bb24b6be17f79784682', + deprecated=True) depends_on('mpi') + maintainers = ['mmesiti', 'edbennett'] + def edit(self, spec, prefix): # Make the `sombrero.sh` driver relocatable - sombrero_sh = FileFilter(join_path(self.stage.source_path, 'sombrero.sh')) + sombrero_sh = FileFilter( + join_path(self.stage.source_path, 'sombrero.sh')) sombrero_dir = join_path(prefix.bin, 'sombrero') sombrero_sh.filter('sombrero/', '{0}/'.format(sombrero_dir)) From ba2e186f31fbcc297814dd997a9bb32f39a50609 Mon Sep 17 00:00:00 2001 From: Robert Mijakovic Date: Fri, 9 Jul 2021 13:06:04 +0200 Subject: [PATCH 016/289] llvm: add v12.0.1 (#24803) Co-authored-by: Robert Mijakovic --- var/spack/repos/builtin/packages/llvm/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 96245b2be7f..4c55482347c 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -29,6 +29,7 @@ class Llvm(CMakePackage, CudaPackage): # fmt: off version('main', branch='main') + version('12.0.1', sha256='66b64aa301244975a4aea489f402f205cde2f53dd722dad9e7b77a0459b4c8df') version('12.0.0', sha256='8e6c99e482bb16a450165176c2d881804976a2d770e0445af4375e78a1fbf19c') version('11.1.0', sha256='53a0719f3f4b0388013cfffd7b10c7d5682eece1929a9553c722348d1f866e79') version('11.0.1', sha256='9c7ad8e8ec77c5bde8eb4afa105a318fd1ded7dff3747d14f012758719d7171b') From 727f43f69f67a62e8f3b4c6ba75732fbccb18709 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Fri, 9 Jul 2021 07:08:04 -0400 Subject: [PATCH 017/289] simmetrix-simmodsuite: add v16.0-210623 and maintainer (#24763) --- .../packages/simmetrix-simmodsuite/package.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/var/spack/repos/builtin/packages/simmetrix-simmodsuite/package.py b/var/spack/repos/builtin/packages/simmetrix-simmodsuite/package.py index 4dd5fb50833..801f95f15eb 100644 --- a/var/spack/repos/builtin/packages/simmetrix-simmodsuite/package.py +++ b/var/spack/repos/builtin/packages/simmetrix-simmodsuite/package.py @@ -10,6 +10,42 @@ def simmodsuite_releases(): releases = [ + { + 'version': '16.0-210623', + 'components': { + 'gmadv': ['c40dac44695db6e97c4d4c06d1eb6eac93518c93d7860c77a69f3ea30fea3b90', 'advmodel'], + 'msparallelmesh': ['57d710b74887731ea0e664a154489747033af433852809181c11e8065752eaf4', 'parallelmesh'], + 'gmcore': ['5bd04f175fdf5a088140af5ca3fa03934251c097044b47fdf3ea2cd0afc28547', 'base'], + 'pskrnl': ['87957818b20839d3835a343894c396f7c591d1f0bfd728d33ad21b1adb4e887c', 'parasolid'], + 'msadapt': ['5ba66819bb2c56eb1e07e6c2659afc8c971005b08ed059f8c62a185236e45dac', 'base'], + 'gmvoxel': ['15dfc389665086ea37b9835fecd6b46070572878308796afa960077cc2bf7e0a', 'voxel'], + 'msparalleladapt': ['1db2c34a398c5965a2a675006c96a3603e0124188b52159776b7c616efa48457', 'paralleladapt'], + 'mscore': ['7029871c52d6c3bb782ae2acb7360130105649cd9cf63815ae95cf4089cb786d', 'base'], + 'psint': ['c8a3dbacafa70b13bc9fb8322699a1cfc812b2cfd3ea05cba9135623eae761d8', 'parasolid'], + 'fdcore': ['75f9bcd7cb9ab9dedb73166539c08b53bd8e91c5619d3dce605ba19c63d1ee5c', 'base'], + 'msadv': ['0018e0a6b9d7724867f7379bc619269481c318ee4dfd0724511c032534ae04a1', 'adv'], + 'aciskrnl': ['2a9b9da9b0c09857de7fef0dea0e96222bd30e297bd37bea962751dab6762500', 'acis'], + 'discrete': ['f17cd198f8749c763cc8e200cfd6734604e1d316a48d7d0e537a9a890d884904', 'discrete'], + 'gmabstract': ['068d0309d5ff9668fc0474edf7f4e20503827400e34492e2ed55b46a0c9e1858', 'abstract'], + }, + 'docs': { + 'GeomSimAdvanced': ['02e4566042ae4de10c4acb577142e82d15f32caa296fe1b578c62a38da707066', 'advmodel'], + 'MeshSim': ['cc1dc77cece7aac6ded003c872c651ad8321bc9ce931ad141b17d2de7bf513c5', 'base'], + 'GeomSimVoxel': ['49b8f85f59acc8c973bf46c1f999a0ae64cdf129371587879de056c0ac3500d8', 'voxel'], + 'MeshSimAdvanced': ['2d2689979104414d91d804ca3c34a69104e572b8f231c4e324b09e57675b61cc', 'adv'], + 'GeomSimGranite': ['17f18831a12b06c0e085486d94d3a4275d7ed94ad53fec689e8877217856c750', 'granite'], + 'GeomSimParasolid': ['492bd311cc42dadd1f76064c57d35e886b9a7da4c48576ec4d34844fcdaddb8d', 'parasolid'], + 'GeomSimAcis': ['341c6aeda7f9189f4e886cb75c5989cb9ece6ecba1b1c9d5273b94f74a3dd40b', 'acis'], + 'GeomSimDiscrete': ['e9d42da613a3acadbcdee5d8d6fc3b093f58b51d158f2a392b7da0e5f74e0388', 'discrete'], + 'MeshSimAdapt': ['e27510e588105bdb0ca62c2629dfd41dfca6039b7b2ff0298ef83d3a48d7dd23', 'base'], + 'GeomSimAbstract': ['398c1a15efcddd3b86a7b0334af6f8b529710f815f73f5655d3c7271e92b194e', 'abstract'], + 'GeomSimDiscreteModeling': ['f444aed59569731f65eea920322adcc224c67b715ecba85a1898cf418de58237', 'discrete'], + 'FieldSim': ['bac947998d4de1c4edba271645310d4784290bec30bf0cf41d00ae6ea8b27c97', 'base'], + 'GeomSim': ['95cb24165d47701daa8da7131ca1173d38f4dab80c1ca0d75843b464fed92097', 'base'], + 'ParallelMeshSim': ['fb1e3ac0ab7208d771057880c693e529e7c821772265b89125d371a1b34fa651', 'parallelmesh'], + 'ParallelMeshSimAdapt': ['246c5c8b30194239f41a79f2ffd205fd9ae69bcb8127d19a94f12c278a27f106', 'paralleladapt'], + } + }, { 'version': '14.0-191122', 'components': { @@ -138,6 +174,7 @@ class SimmetrixSimmodsuite(Package): of sources """ + maintainers = ['cwsmith'] homepage = "http://www.simmetrix.com/products/SimulationModelingSuite/main.html" manual_download = True From aeab3b287273f387e982d5e2d73ea753ca3f9acd Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:16:43 +0200 Subject: [PATCH 018/289] py-jupyter-packaging: add new package (#24751) --- .../packages/py-jupyter-packaging/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-jupyter-packaging/package.py diff --git a/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py b/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py new file mode 100644 index 00000000000..7875ec2b5d8 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-jupyter-packaging/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyJupyterPackaging(PythonPackage): + """Jupyter Packaging Utilities.""" + + homepage = "https://github.com/jupyter/jupyter-packaging" + pypi = "jupyter_packaging/jupyter_packaging-0.10.4.tar.gz" + + version('0.10.4', sha256='589db027cb85a92612f9bcfaeecaa8a9072ac8a4bddaf827f648664258e587c4') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools@46.4.0:', type=('build', 'run')) + depends_on('py-packaging', type=('build', 'run')) + depends_on('py-tomlkit', type=('build', 'run')) + depends_on('py-wheel', type=('build', 'run')) + depends_on('py-deprecation', type=('build', 'run')) From 1b26c47cb8db0970fed6ffec59c6064dd2f3aa9e Mon Sep 17 00:00:00 2001 From: Olivier Cessenat Date: Fri, 9 Jul 2021 13:17:43 +0200 Subject: [PATCH 019/289] latex2html: adding the famous LaTeX to HTML converter (#24750) --- .../builtin/packages/latex2html/package.py | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 var/spack/repos/builtin/packages/latex2html/package.py diff --git a/var/spack/repos/builtin/packages/latex2html/package.py b/var/spack/repos/builtin/packages/latex2html/package.py new file mode 100644 index 00000000000..ee43ba07a8d --- /dev/null +++ b/var/spack/repos/builtin/packages/latex2html/package.py @@ -0,0 +1,93 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os +import platform + +from spack import * + + +class Latex2html(AutotoolsPackage): + """LaTeX2HTML is a utility that converts LaTeX documents to web pages in HTML.""" + + homepage = "https://www.latex2html.org/" + url = "https://github.com/latex2html/latex2html/archive/refs/tags/v2021.tar.gz" + git = "https://github.com/latex2html/latex2html.git" + + maintainers = ['cessenat'] + + version('master', branch='master') + version('2021', sha256='872fe7a53f91ababaafc964847639e3644f2b9fab3282ea059788e4e18cbba47') + version('2017', sha256='28a5d4b8f14b1f95928da281b6332559bcd83349ba439b2fa43655b2e21c83ab') + + variant('svg', default=True, description='Enable SVG images') + variant('png', default=True, description='Enable PNG images') + variant('gif', default=True, description='Enable GIF images') + + depends_on('ghostscript', type=('build', 'run')) + depends_on('perl', type=('build', 'run')) + # Provides pdfcrop scheme=full + depends_on('texlive', type=('build', 'run')) + + depends_on('netpbm', type=('build', 'run')) + # Provides pdftocairo + depends_on('poppler+glib', type=('build', 'run'), when='+svg') + + # A copy of texlive function as long as it does not provide the + # bin env to dependent package: + def tex_arch(self): + tex_arch = '{0}-{1}'.format(platform.machine(), + platform.system().lower()) + return tex_arch + + def configure_args(self): + spec = self.spec + args = ['--with-perl={0}'.format(spec['perl'].command.path)] + args.extend(self.enable_or_disable('png')) + args.extend(self.enable_or_disable('gif')) + args.extend(self.enable_or_disable('svg')) + + # Since packages do not always provide a proper dependent_build_environment, + # one needs to guess where the bins are since latex2html configure wants to + # hard set the bins location once for all: + for p in ['gs', 'ps2pdf']: + exe = join_path(spec['ghostscript'].prefix.bin, p) + if os.path.exists(exe): + args.append('--with-{0}={1}'.format(p, exe)) + pnms = ['pnmcrop', 'pnmflip', 'ppmquant', 'pnmfile', 'pnmcat', 'pbmmake', + 'ppmtogif', 'pnmtopng', 'ppmtojpeg', 'pnmcut', 'pnmpad', 'pnmrotate', + 'pnmscale', 'giftopnm', 'jpegtopnm', 'pngtopnm', 'tifftopnm', + 'anytopnm', 'bmptoppm', 'pcxtoppm', 'sgitopnm', 'xbmtopbm', 'xwdtopnm'] + for p in pnms: + exe = join_path(spec['netpbm'].prefix.bin, p) + if os.path.exists(exe): + args.append('--with-{0}={1}'.format(p, exe)) + + # PR #24102 at https://github.com/spack/spack/pull/24102 + # should make this useless ; but at least it lets us know which are the + # texlive bins that latex2html may use. + lats = ['pdfcrop', 'tex', 'initex', 'latex', 'dvips', 'dvipng', 'pdflatex', + 'lualatex', 'dvilualatex', 'kpsewhich', 'mktexlsr'] + for p in lats: + exe = join_path(spec['texlive'].prefix.bin, self.tex_arch(), p) + if os.path.exists(exe): + args.append('--with-{0}={1}'.format(p, exe)) + else: + # This should be the only needed code if texlive where + # to set its proper dependent_build_environment + exe = which(p) + if exe: + args.append('--with-{0}={1}'.format(p, str(exe))) + if '+svg' in spec: + p = 'pdftocairo' + exe = join_path(spec['poppler'].prefix.bin, p) + if os.path.exists(exe): + args.append('--with-{0}={1}'.format(p, exe)) + else: + exe = which(p) + if exe: + args.append('--with-{0}={1}'.format(p, str(exe))) + + return args From 4a44f023e8251bde612a4792cc409ec280ed4622 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:37:08 +0200 Subject: [PATCH 020/289] py-jupyter-server: add new package (#24777) --- .../packages/py-jupyter-server/package.py | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-jupyter-server/package.py diff --git a/var/spack/repos/builtin/packages/py-jupyter-server/package.py b/var/spack/repos/builtin/packages/py-jupyter-server/package.py new file mode 100644 index 00000000000..b63cd6ae39d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-jupyter-server/package.py @@ -0,0 +1,36 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyJupyterServer(PythonPackage): + """The Jupyter Server provides the backend (i.e. the core services, APIs, + and REST endpoints) for Jupyter web applications like Jupyter notebook, + JupyterLab, and Voila.""" + + homepage = "https://github.com/jupyter-server/jupyter_server" + pypi = "jupyter_server/jupyter_server-1.9.0.tar.gz" + + version('1.9.0', sha256='7d19006380f6217458a9db309b54e3dab87ced6c06329c61823907bef2a6f51b') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-jinja2', type=('build', 'run')) + depends_on('py-tornado@6.1.0:', type=('build', 'run')) + depends_on('py-pyzmq@17:', type=('build', 'run')) + depends_on('py-argon2-cffi', type=('build', 'run')) + depends_on('py-ipython-genutils', type=('build', 'run')) + depends_on('py-traitlets@4.2.1:', type=('build', 'run')) + depends_on('py-jupyter-core@4.6.0:', type=('build', 'run')) + depends_on('py-jupyter-client@6.1.1:', type=('build', 'run')) + depends_on('py-nbformat', type=('build', 'run')) + depends_on('py-nbconvert', type=('build', 'run')) + depends_on('py-send2trash', type=('build', 'run')) + depends_on('py-terminado@0.8.3:', type=('build', 'run')) + depends_on('py-prometheus-client', type=('build', 'run')) + depends_on('py-anyio@3.1.0:3.99', type=('build', 'run')) + depends_on('py-websocket-client', type=('build', 'run')) + depends_on('py-requests-unixsocket', type=('build', 'run')) From ace28e2ef51f0baf482208a5b32a1084418afe14 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 9 Jul 2021 07:26:02 -0500 Subject: [PATCH 021/289] pinentry: add gui multi-valued variant (#24717) --- .../builtin/packages/pinentry/package.py | 66 ++++++++++++++----- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/pinentry/package.py b/var/spack/repos/builtin/packages/pinentry/package.py index 01fce6c5ea3..7b226f2cbe3 100644 --- a/var/spack/repos/builtin/packages/pinentry/package.py +++ b/var/spack/repos/builtin/packages/pinentry/package.py @@ -20,27 +20,35 @@ class Pinentry(AutotoolsPackage): version('1.1.1', sha256='cd12a064013ed18e2ee8475e669b9f58db1b225a0144debdb85a68cecddba57f') version('1.1.0', sha256='68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570') + supported_guis = [ + 'curses', 'tty', 'emacs', 'efl', 'gtk2', 'gnome3', 'qt', 'qt5', 'tqt', 'fltk' + ] + + # Default to 'tty' as it has no additional dependencies + variant('gui', default='tty', description='GUI to use for passphrase entry', + values=supported_guis, multi=True) + depends_on('libgpg-error@1.16:') depends_on('libassuan@2.1.0:') + # Optional GUI dependencies + depends_on('ncurses', when='gui=curses') + depends_on('emacs', when='gui=emacs') + # depends_on('efl@1.18:', when='gui=efl') # Enlightenment + depends_on('gtkplus@2:', when='gui=gtk2') + # depends_on('gnome@3:', when='gui=gnome3') # GNOME + depends_on('qt@4.4.0:', when='gui=qt') + depends_on('qt@5.0:5.999', when='gui=qt5') + # depends_on('tqt', when='gui=tqt') # Trinity QT + depends_on('fltk@1.3:', when='gui=fltk') + + # TODO: add packages for these optional GUIs + conflicts('gui=efl') + conflicts('gui=gnome3') + conflicts('gui=tqt') + def configure_args(self): - return [ - '--enable-static', - '--enable-shared', - # Autotools automatically enables these if dependencies found - # TODO: add variants for these - '--disable-pinentry-curses', - '--disable-pinentry-emacs', - '--disable-pinentry-gtk2', - '--disable-pinentry-gnome3', - '--disable-pinentry-qt', - '--disable-pinentry-qt5', - '--disable-pinentry-tqt', - '--disable-pinentry-fltk', - - # No dependencies, simplest installation - '--enable-pinentry-tty', - + args = [ # Disable extra features '--disable-fallback-curses', '--disable-inside-emacs', @@ -50,3 +58,27 @@ def configure_args(self): '--with-gpg-error-prefix=' + self.spec['libgpg-error'].prefix, '--with-libassuan-prefix=' + self.spec['libassuan'].prefix, ] + + if 'gui=curses' in self.spec: + args.append('--with-ncurses-include-dir=' + + self.spec['ncurses'].headers.directories[0]) + + for gui in self.supported_guis: + if 'gui=' + gui in self.spec: + args.append('--enable-pinentry-' + gui) + else: + args.append('--disable-pinentry-' + gui) + + return args + + def test(self): + kwargs = { + 'exe': self.prefix.bin.pinentry, + 'options': ['--version'], + 'expected': [str(self.version)], + } + self.run_test(**kwargs) + for gui in self.supported_guis: + if 'gui=' + gui in self.spec: + kwargs['exe'] = self.prefix.bin.pinentry + '-' + gui + self.run_test(**kwargs) From 2e80b60a04e413e22f476c81affa6e82e4526c95 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 9 Jul 2021 14:29:04 +0200 Subject: [PATCH 022/289] Add ReFrame 3.6.3 (#24664) --- var/spack/repos/builtin/packages/reframe/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/reframe/package.py b/var/spack/repos/builtin/packages/reframe/package.py index 252e94af897..81d9cbaf8dd 100644 --- a/var/spack/repos/builtin/packages/reframe/package.py +++ b/var/spack/repos/builtin/packages/reframe/package.py @@ -24,6 +24,7 @@ class Reframe(Package): maintainers = ['victorusu', 'vkarak'] version('master', branch='master') + version('3.6.3', sha256='3616478c886c89385385d04f5bce625a690eec6bdca603cd5ac3a6f443168ac2') version('3.6.2', sha256='b4725e434f4cd721ca825a56a652e67aa77e7af5ed7ca00f281747585827060d') version('3.6.1', sha256='1ee35a2de42cdd2476c17cc15caf6a7795d976ba7b058d518da7d314e7af2136') version('3.6.0', sha256='de1e0ea2677f2a49af4b64544379579515db36c2164f6dc647c3fbaab5f78462') From f830585994aa094e69770f17187730809890e01a Mon Sep 17 00:00:00 2001 From: Enrico Usai <10634438+enrico-usai@users.noreply.github.com> Date: Fri, 9 Jul 2021 15:13:57 +0200 Subject: [PATCH 023/289] aws-parallelcluster: add v2.11.0 (#24648) --- .../builtin/packages/aws-parallelcluster/package.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/aws-parallelcluster/package.py b/var/spack/repos/builtin/packages/aws-parallelcluster/package.py index 30655c66f84..9f3c4b860e9 100644 --- a/var/spack/repos/builtin/packages/aws-parallelcluster/package.py +++ b/var/spack/repos/builtin/packages/aws-parallelcluster/package.py @@ -13,12 +13,13 @@ class AwsParallelcluster(PythonPackage): tool to deploy and manage HPC clusters in the AWS cloud.""" homepage = "https://github.com/aws/aws-parallelcluster" - pypi = "aws-parallelcluster/aws-parallelcluster-2.10.4.tar.gz" + pypi = "aws-parallelcluster/aws-parallelcluster-2.11.0.tar.gz" maintainers = [ 'demartinofra', 'enrico-usai', 'lukeseawalker', 'rexcsn', 'tilne' ] + version('2.11.0', sha256='ec2f54f752a355649ca065a41fa4ac19697f570a136e10e0a6548f5abad3ea8a') version('2.10.4', sha256='487dbf3e79f3e9b6750b1075cef4eb24956f7b310e5bd8de662b98d87491736c') version('2.10.3', sha256='02016358932375c1abb566c6b7f1c891fa617fc4a4ec4ce9969f87758d4039c7') version('2.10.2', sha256='95853535b82e8087c6635a946556ed886e68d3a77d67a375830c57d80f2bbd6e') @@ -34,14 +35,16 @@ class AwsParallelcluster(PythonPackage): version('2.5.1', sha256='4fd6e14583f8cf81f9e4aa1d6188e3708d3d14e6ae252de0a94caaf58be76303') version('2.5.0', sha256='3b0209342ea0d9d8cc95505456103ad87c2d4e35771aa838765918194efd0ad3') - depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) + depends_on('python@3.6:', when='@2.11:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.4:', when='@:2.10', type=('build', 'run')) - depends_on('py-future@0.16.0:0.18.2', type=('build', 'run')) + depends_on('py-future@0.16.0:0.18.2', when='@:2.10', type=('build', 'run')) depends_on('py-ipaddress@1.0.22:', type=('build', 'run')) depends_on('py-configparser@3.5.0:3.8.1', when='^python@:2', type=('build', 'run')) + depends_on('py-tabulate@0.8.2:0.8.9', when='@2.11:', type=('build', 'run')) depends_on('py-tabulate@0.8.2:0.8.3', when='@:2.8', type=('build', 'run')) depends_on('py-tabulate@0.8.5', when='@2.9: ^python@3.0:3.4', type=('build', 'run')) depends_on('py-tabulate@0.8.2:0.8.7', when='@2.9: ^python@:2,3.5:', type=('build', 'run')) From 9add3182c79fd5b7e32e7c9287370b04abca527c Mon Sep 17 00:00:00 2001 From: Sebastian Schmitt Date: Fri, 9 Jul 2021 15:15:21 +0200 Subject: [PATCH 024/289] Add py-salib (#24218) --- .../builtin/packages/py-salib/package.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-salib/package.py diff --git a/var/spack/repos/builtin/packages/py-salib/package.py b/var/spack/repos/builtin/packages/py-salib/package.py new file mode 100644 index 00000000000..cdc49ccc9b3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-salib/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PySalib(PythonPackage): + """Python implementations of commonly used sensitivity analysis methods.""" + + homepage = "http://salib.readthedocs.org" + pypi = "SALib/SALib-1.4.0.1.tar.gz" + + maintainers = ['schmitts'] + + version('1.4.0.1', sha256='dbf6e865af9f3be82a79cf64889ed66d6d3b6803f0c22a242a112876789d49e7') + + depends_on('py-setuptools@38.3:', type=('build', 'run')) + depends_on('py-numpy@1.16.5:', type=('build', 'run')) + depends_on('py-scipy@1.5.2:', type=('build', 'run')) + depends_on('py-matplotlib@3.2.2:', type=('build', 'run')) + depends_on('py-pandas@1.1.2:', type=('build', 'run')) + depends_on('py-pathos@0.2.5:', type=('build', 'run')) From 8cb3253a04e25db37d382bd9319b730fde6d1df1 Mon Sep 17 00:00:00 2001 From: Sebastian Schmitt Date: Fri, 9 Jul 2021 15:16:39 +0200 Subject: [PATCH 025/289] Update ppft (#24632) --- var/spack/repos/builtin/packages/py-ppft/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-ppft/package.py b/var/spack/repos/builtin/packages/py-ppft/package.py index b59359b1d61..758280ed5ca 100644 --- a/var/spack/repos/builtin/packages/py-ppft/package.py +++ b/var/spack/repos/builtin/packages/py-ppft/package.py @@ -12,20 +12,23 @@ class PyPpft(PythonPackage): homepage = "https://github.com/uqfoundation/ppft" pypi = "ppft/ppft-1.6.4.9.tar.gz" + version('1.6.6.4', sha256='473442cc6731856990bd25bd6b454bb98720007de4523a73c560bdd0060463d2') version('1.6.4.9', sha256='5537b00afb7b247da0f59cc57ee5680178be61c8b2e21b5a0672b70a3d247791') version('1.6.4.7.1', sha256='f94b26491b4a36adc975fc51dba7568089a24756007a3a4ef3414a98d7337651') version('1.6.4.6', sha256='92d09061f5425634c43dbf99c5558f2cf2a2e1e351929f8da7e85f4649c11095') version('1.6.4.5', sha256='d47da9d2e553848b75727ce7c510f9e149965d5c68f9fc56c774a7c6a3d18214') - depends_on('python@2.5:2.8,3.1:') + depends_on('python@2.5:2.8,3.1:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.6:', when='@1.6.6.4:', type=('build', 'run')) depends_on('py-setuptools@0.6:', type='build') depends_on('py-six@1.7.3:', type=('build', 'run')) depends_on('py-dill@0.2.6:', type=('build', 'run')) + depends_on('py-dill@0.3.4:', type=('build', 'run'), when='@1.6.6.4:') def url_for_version(self, version): url = "https://pypi.io/packages/source/p/ppft/" - if version >= Version('1.6.4.8'): + if Version('1.6.6.4') > version >= Version('1.6.4.8'): url += 'ppft-{0}.tar.gz' else: url += 'ppft-{0}.zip' From 7d334471d3beb2192be44df31d7bac267f8b032f Mon Sep 17 00:00:00 2001 From: figroc Date: Fri, 9 Jul 2021 22:05:16 +0800 Subject: [PATCH 026/289] protobuf: add versions up to 3.17.3 (#24691) --- .../repos/builtin/packages/protobuf/package.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py index ab3c8591a13..7c1c0763d84 100644 --- a/var/spack/repos/builtin/packages/protobuf/package.py +++ b/var/spack/repos/builtin/packages/protobuf/package.py @@ -13,8 +13,20 @@ class Protobuf(Package): """Google's data interchange format.""" homepage = "https://developers.google.com/protocol-buffers" - url = "https://github.com/protocolbuffers/protobuf/archive/v3.12.2.tar.gz" + url = "https://github.com/protocolbuffers/protobuf/archive/v3.17.3.tar.gz" + version('3.17.3', sha256='c6003e1d2e7fefa78a3039f19f383b4f3a61e81be8c19356f85b6461998ad3db') + version('3.17.0', sha256='eaba1dd133ac5167e8b08bc3268b2d33c6e9f2dcb14ec0f97f3d3eed9b395863') + version('3.16.0', sha256='7892a35d979304a404400a101c46ce90e85ec9e2a766a86041bb361f626247f5') + version('3.15.7', sha256='efdd6b932a2c0a88a90c4c80f88e4b2e1bf031e7514dbb5a5db5d0bf4f295504') + version('3.15.5', sha256='bc3dbf1f09dba1b2eb3f2f70352ee97b9049066c9040ce0c9b67fb3294e91e4b') + version('3.15.4', sha256='07f8a02afc14a657f727ed89a8ec5627b9ecc47116d60acaabaa1da233bd2e8f') + version('3.15.2', sha256='3c85fdac243dab1f6cd725eb58e361cdbb3ec4480052ac90b1ab55c608112cd0') + version('3.15.1', sha256='f18a40816260a9a3190a94efb0fc26270b244a2436681602f0a944739095d632') + version('3.15.0', sha256='6aff9834fd7c540875e1836967c8d14c6897e3785a2efac629f69860fb7834ff') + version('3.14.0', sha256='d0f5f605d0d656007ce6c8b5a82df3037e1d8fe8b121ed42e536f569dec16113') + version('3.13.0', sha256='9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a') + version('3.12.3', sha256='71030a04aedf9f612d2991c1c552317038c3c5a2b578ac4745267a45e7037c29') version('3.12.2', sha256='bb8ce9ba11eb7bccf080599fe7cad9cc461751c8dd1ba61701c0070d58cde973') version('3.12.1', sha256='cb9b3f9d625b5739a358268eb3421de11cacd90025f5f7672c3930553eca810e') version('3.12.0', sha256='946ba5371e423e1220d2cbefc1f65e69a1e81ca5bab62a03d66894172983cfcd') From cdd6c71f66cba2b7521347944c4f75ecf8d2e85b Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:09:13 +0200 Subject: [PATCH 027/289] py-greenlet: add v1.1.0 (#24682) --- var/spack/repos/builtin/packages/py-greenlet/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-greenlet/package.py b/var/spack/repos/builtin/packages/py-greenlet/package.py index 9af8f00180a..43d9f197f2e 100644 --- a/var/spack/repos/builtin/packages/py-greenlet/package.py +++ b/var/spack/repos/builtin/packages/py-greenlet/package.py @@ -12,7 +12,10 @@ class PyGreenlet(PythonPackage): homepage = "https://github.com/python-greenlet/greenlet" pypi = "greenlet/greenlet-0.4.17.tar.gz" + version('1.1.0', sha256='c87df8ae3f01ffb4483c796fe1b15232ce2b219f0b18126948616224d3f658ee') version('0.4.17', sha256='41d8835c69a78de718e466dd0e6bfd4b46125f21a67c3ff6d76d8d8059868d6b') version('0.4.13', sha256='0fef83d43bf87a5196c91e73cb9772f945a4caaff91242766c5916d1dd1381e4') - depends_on('python', type=('build', 'link', 'run')) + depends_on('python@2.7:2.8,3.5:', when='@1:', type=('build', 'link', 'run')) + depends_on('python', when='@:0.9', type=('build', 'link', 'run')) + depends_on('py-setuptools', when='@1:', type='build') From 2d1631c9fdfe36d1cd2d33a4c97183b67152f3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Dai=C3=9F?= Date: Fri, 9 Jul 2021 16:09:35 +0200 Subject: [PATCH 028/289] sgpp: add v3.4.0 (#24678) --- var/spack/repos/builtin/packages/sgpp/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/sgpp/package.py b/var/spack/repos/builtin/packages/sgpp/package.py index a37086d7ae8..d5b18472f2b 100644 --- a/var/spack/repos/builtin/packages/sgpp/package.py +++ b/var/spack/repos/builtin/packages/sgpp/package.py @@ -19,6 +19,7 @@ class Sgpp(SConsPackage): # Versions with Python 3 bindings: version('master', branch='master') + version('3.4.0', sha256='450d4002850b0a48c561abe221b634261ca44eee111ca605c3e80797182f40b3') version('3.3.0', sha256='ca4d5b79f315b425ce69b04940c141451a76848bf1bd7b96067217304c68e2d4') version('3.2.0', sha256='dab83587fd447f92ed8546eacaac6b8cbe65b8db5e860218c0fa2e42f776962d') # Versions with Python 2 bindings: @@ -81,9 +82,8 @@ class Sgpp(SConsPackage): extends('python', when='+python') depends_on('py-setuptools', when='+python', type=('build')) # Python 3 support was added in version 3.2.0 - depends_on('python', when='+python', type=('build', 'run')) depends_on('python@2.7:2.8', when='@1.0.0:3.1.0+python', type=('build', 'run')) - depends_on('python@3:', when='@3.2.0:+python', type=('build', 'run')) + depends_on('python@3.7:', when='@3.2.0:+python', type=('build', 'run')) depends_on('swig@3:', when='+python', type=('build')) # Python libraries (version depends on whether we use Python 2 or 3) depends_on('py-numpy', when='+python', type=('build', 'run')) From cd118341e91634d154a605fc5ceef45230de44de Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:21:56 +0200 Subject: [PATCH 029/289] py-nbclassic: add new packageg (#24778) --- .../builtin/packages/py-nbclassic/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-nbclassic/package.py diff --git a/var/spack/repos/builtin/packages/py-nbclassic/package.py b/var/spack/repos/builtin/packages/py-nbclassic/package.py new file mode 100644 index 00000000000..ab98af4ddf8 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-nbclassic/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyNbclassic(PythonPackage): + """Jupyter Notebook as a Jupyter Server Extension.""" + + homepage = "https://github.com/jupyterlab/nbclassic" + pypi = "nbclassic/nbclassic-0.3.1.tar.gz" + + version('0.3.1', sha256='f920f8d09849bea7950e1017ff3bd101763a8d68f565a51ce053572e65aa7947') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-jupyter-server@1.8:1.999', type=('build', 'run')) + depends_on('py-notebook@:6.999', type=('build', 'run')) From 463c7042651c720c1f18ceedefa39956d7a0fc80 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:35:26 +0200 Subject: [PATCH 030/289] py-jupyterlab-server: add v2.6.0 (#24779) --- .../builtin/packages/py-jupyterlab-server/package.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py b/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py index 35496e3a419..3252bfc45ec 100644 --- a/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py +++ b/var/spack/repos/builtin/packages/py-jupyterlab-server/package.py @@ -8,16 +8,22 @@ class PyJupyterlabServer(PythonPackage): """A set of server components for JupyterLab and JupyterLab like applications""" + homepage = "https://github.com/jupyterlab/jupyterlab_server" pypi = "jupyterlab_server/jupyterlab_server-1.2.0.tar.gz" + version('2.6.0', sha256='f300adf6bb0a952bebe9c807a3b2a345d62da39b476b4f69ea0dc6b5f3f6b97d') version('1.2.0', sha256='5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c') version('1.1.0', sha256='bac27e2ea40f686e592d6429877e7d46947ea76c08c878081b028c2c89f71733') + depends_on('python@3.6:', when='@2.5:', type=('build', 'run')) depends_on('python@3.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') depends_on('py-requests', type=('build', 'run')) depends_on('py-json5', type=('build', 'run')) depends_on('py-jsonschema@3.0.1:', type=('build', 'run')) - depends_on('py-notebook@4.2.0:', type=('build', 'run')) depends_on('py-jinja2@2.10:', type=('build', 'run')) + depends_on('py-babel', when='@2.5.1:', type=('build', 'run')) + depends_on('py-packaging', when='@2.5.1:', type=('build', 'run')) + depends_on('py-jupyter-server@1.4:1.99', when='@2.5.1:', type=('build', 'run')) + depends_on('py-notebook@4.2.0:', when='@:2.5.0', type=('build', 'run')) From aaeaa0516de542f5bfdbf57701fa79e4e835b2d5 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:52:49 +0200 Subject: [PATCH 031/289] py-jeepney: add v0.6.0 (#24674) --- var/spack/repos/builtin/packages/py-jeepney/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-jeepney/package.py b/var/spack/repos/builtin/packages/py-jeepney/package.py index d202a5e9f95..e4004afe8ab 100644 --- a/var/spack/repos/builtin/packages/py-jeepney/package.py +++ b/var/spack/repos/builtin/packages/py-jeepney/package.py @@ -10,6 +10,8 @@ class PyJeepney(PythonPackage): homepage = "https://gitlab.com/takluyver/jeepney" pypi = "jeepney/jeepney-0.4.3.tar.gz" + version('0.6.0', sha256='7d59b6622675ca9e993a6bd38de845051d315f8b0c72cca3aef733a20b648657') version('0.4.3', sha256='3479b861cc2b6407de5188695fa1a8d57e5072d7059322469b62628869b8e36e') - depends_on('python@3.5:', type=('build', 'run')) + depends_on('python@3.6:', when='@0.5:', type=('build', 'run')) + depends_on('python@3.5:', when='@:0.4', type=('build', 'run')) From a2a2d6ab7edaa6fab9d2fb95586fde8f1f74b1cc Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:53:01 +0200 Subject: [PATCH 032/289] py-aniso8601: add new package (#24672) --- .../builtin/packages/py-aniso8601/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-aniso8601/package.py diff --git a/var/spack/repos/builtin/packages/py-aniso8601/package.py b/var/spack/repos/builtin/packages/py-aniso8601/package.py new file mode 100644 index 00000000000..e94e71d9789 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-aniso8601/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyAniso8601(PythonPackage): + """A library for parsing ISO 8601 strings.""" + + homepage = "https://bitbucket.org/nielsenb/aniso8601" + pypi = "aniso8601/aniso8601-9.0.1.tar.gz" + + version('9.0.1', sha256='72e3117667eedf66951bb2d93f4296a56b94b078a8a95905a052611fb3f1b973') + + depends_on('py-setuptools', type='build') From 46fa8481d93509c9e430dca0e8ad38322f26274b Mon Sep 17 00:00:00 2001 From: Paul Kuberry Date: Fri, 9 Jul 2021 08:54:06 -0600 Subject: [PATCH 033/289] trilinos: add a neww maintainer (#24670) --- var/spack/repos/builtin/packages/trilinos/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 162411f7744..42b8011e230 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -30,7 +30,7 @@ class Trilinos(CMakePackage, CudaPackage): url = "https://github.com/trilinos/Trilinos/archive/trilinos-release-12-12-1.tar.gz" git = "https://github.com/trilinos/Trilinos.git" - maintainers = ['keitat', 'sethrj'] + maintainers = ['keitat', 'sethrj', 'kuberry'] # ###################### Versions ########################## From 0edb7937e799d77045ef54a51d0753588cd84e02 Mon Sep 17 00:00:00 2001 From: Simon Frasch Date: Fri, 9 Jul 2021 16:54:37 +0200 Subject: [PATCH 034/289] spfft: add v1.0.4 (#24662) --- var/spack/repos/builtin/packages/spfft/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/spfft/package.py b/var/spack/repos/builtin/packages/spfft/package.py index 4660ce30ca6..a5e6448e82d 100644 --- a/var/spack/repos/builtin/packages/spfft/package.py +++ b/var/spack/repos/builtin/packages/spfft/package.py @@ -17,6 +17,7 @@ class Spfft(CMakePackage, CudaPackage): version('develop', branch='develop') version('master', branch='master') + version('1.0.4', sha256='41e63880d95343da0d8c3dbe5bfb3d46a1d612199cc9cc13a936f1628a7fdb8e') version('1.0.3', sha256='4f87734e3582ef96ddc0402d0db78cfc173bed9cab3e0d9c6a6bf8b660d69559') version('1.0.2', sha256='9b1296bda0b9ec3d37c74fd64354a01ebc6e2da7cb026c1f821882160b03c692') version('1.0.1', sha256='f8ab706309776cfbd2bfd8e29a6a9ffb5c8f3cd62399bf82db1e416ae5c490c8') From 07fab46262b98c86eca6d17bf8216d2819c4b7ac Mon Sep 17 00:00:00 2001 From: Simon Frasch Date: Fri, 9 Jul 2021 16:54:49 +0200 Subject: [PATCH 035/289] spla: add v1.5.1 (#24661) --- var/spack/repos/builtin/packages/spla/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/spla/package.py b/var/spack/repos/builtin/packages/spla/package.py index d4d12379098..544cf974cd0 100644 --- a/var/spack/repos/builtin/packages/spla/package.py +++ b/var/spack/repos/builtin/packages/spla/package.py @@ -15,6 +15,7 @@ class Spla(CMakePackage): url = "https://github.com/eth-cscs/spla/archive/v1.0.0.tar.gz" git = 'https://github.com/eth-cscs/spla.git' + version('1.5.1', sha256='2021a30b7cbb10bd660e5d94e1cc7bc6a428c87ea507e09d1e57e455685da421') version('1.5.0', sha256='bea782d46ce615e1c40efc2bfb19d95e3b59f332fc9ca83ac7e6684b8ac2dd93') version('1.4.0', sha256='364a9fe759fddec8a0839cf79f1cf0619fc36f4d4c15f1c2b1f437249d7840c6') version('1.3.0', sha256='ff05a22bd655607ff941f3228ac8605a813e1eec6eaa49fbcf7b58a3a4cf5f00') From 02c5c76f0bfc6fd51f022e1008399ef85beb7938 Mon Sep 17 00:00:00 2001 From: Dylan Simon Date: Fri, 9 Jul 2021 10:58:02 -0400 Subject: [PATCH 036/289] pthreadpool: enable shared libraries (#24657) Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/pthreadpool/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/pthreadpool/package.py b/var/spack/repos/builtin/packages/pthreadpool/package.py index b884dc96cbc..a2e7756065d 100644 --- a/var/spack/repos/builtin/packages/pthreadpool/package.py +++ b/var/spack/repos/builtin/packages/pthreadpool/package.py @@ -50,6 +50,7 @@ class Pthreadpool(CMakePackage): def cmake_args(self): return [ + self.define('BUILD_SHARED_LIBS', True), self.define('FXDIV_SOURCE_DIR', join_path(self.stage.source_path, 'deps', 'fxdiv')), self.define('GOOGLETEST_SOURCE_DIR', From 9797c8f060bdcc6ded5633423f6ad0f7aac1ebb0 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:58:26 +0200 Subject: [PATCH 037/289] py-sqlalchemy: add 1.4.20 (#24676) Co-authored-by: Adam J. Stewart --- .../builtin/packages/py-sqlalchemy/package.py | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-sqlalchemy/package.py b/var/spack/repos/builtin/packages/py-sqlalchemy/package.py index 6633e253c68..8e342fd7384 100644 --- a/var/spack/repos/builtin/packages/py-sqlalchemy/package.py +++ b/var/spack/repos/builtin/packages/py-sqlalchemy/package.py @@ -25,6 +25,7 @@ class PySqlalchemy(PythonPackage): 'sqlalchemy.engine', 'sqlalchemy.pool', 'sqlalchemy.event', 'sqlalchemy.sql' ] + version('1.4.20', sha256='38ee3a266afef2978e82824650457f70c5d74ec0cadec1b10fe5ed6f038eb5d0') version('1.3.19', sha256='3bba2e9fbedb0511769780fe1d63007081008c5c2d7d715e91858c94dbaa260e') version('1.3.9', sha256='272a835758908412e75e87f75dd0179a51422715c125ce42109632910526b1fd') version('1.2.19', sha256='5bb2c4fc2bcc3447ad45716c66581eab982c007dcf925482498d8733f86f17c7') @@ -32,12 +33,23 @@ class PySqlalchemy(PythonPackage): version('1.1.18', sha256='8b0ec71af9291191ba83a91c03d157b19ab3e7119e27da97932a4773a3f664a9') version('1.0.12', sha256='6679e20eae780b67ba136a4a76f83bb264debaac2542beefe02069d0206518d1') - depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.6:', when='@1.4:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.4:', when='@:1.3', type=('build', 'run')) depends_on('py-setuptools', type='build') + depends_on('py-importlib-metadata', when='@1.4.0: ^python@:3.7', type='run') + depends_on('py-greenlet@:0.4.16,0.4.18:', when='@1.4.0: ^python@3:', type='run') variant('backend', description='Python modules for database access', values=any_combination_of('mysql', 'pymysql', 'postgresql')) - depends_on('py-mysqlclient', when='backend=mysql', type=('build', 'run')) - depends_on('py-pymysql', when='backend=pymysql', type=('build', 'run')) - depends_on('py-psycopg2', when='backend=postgresql', type=('build', 'run')) + # >=1.4.0 + depends_on('py-mysqlclient@1.4:', when='backend=mysql @1.4: ^python@3:', type=('build', 'run')) + depends_on('py-mysqlclient@1.4:,:1.99', when='backend=mysql @1.4: ^python@:2.7', type=('build', 'run')) + depends_on('py-pymysql', when='backend=pymysql @1.4: ^python@3:', type=('build', 'run')) + depends_on('py-pymysql@:0.999', when='backend=pymysql @1.4: ^python@:2.7', type=('build', 'run')) + depends_on('py-psycopg2@2.7:', when='backend=postgresql @1.4:', type=('build', 'run')) + + # < 1.4.0 + depends_on('py-mysqlclient', when='backend=mysql @:1.3', type=('build', 'run')) + depends_on('py-pymysql', when='backend=pymysql @:1.3', type=('build', 'run')) + depends_on('py-psycopg2', when='backend=postgresql @:1.3', type=('build', 'run')) From fabe86be96c6a83a490f9ac60997e4403d2af564 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 16:58:44 +0200 Subject: [PATCH 038/289] py-bids-validator: add new package (#24677) --- .../packages/py-bids-validator/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-bids-validator/package.py diff --git a/var/spack/repos/builtin/packages/py-bids-validator/package.py b/var/spack/repos/builtin/packages/py-bids-validator/package.py new file mode 100644 index 00000000000..6d388424b16 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bids-validator/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyBidsValidator(PythonPackage): + """Validator for the Brain Imaging Data Structure""" + + homepage = "https://github.com/bids-standard/bids-validator" + pypi = "bids-validator/bids-validator-1.7.2.tar.gz" + + version('1.7.2', sha256='12398831a3a3a2ed7c67e693cf596610c23dd23e0889bfeae0830bbd1d41e5b9') + + depends_on('py-setuptools', type='build') From 4682ff0cc4df8cbf655dec49a7a8ae455ca8db7f Mon Sep 17 00:00:00 2001 From: Gabriel Rockefeller Date: Fri, 9 Jul 2021 08:59:23 -0600 Subject: [PATCH 039/289] global: add v6.6.6 (#24642) --- var/spack/repos/builtin/packages/global/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py index 6f8ed605127..661220f6aad 100644 --- a/var/spack/repos/builtin/packages/global/package.py +++ b/var/spack/repos/builtin/packages/global/package.py @@ -14,6 +14,9 @@ class Global(Package): homepage = "http://www.gnu.org/software/global" url = "http://tamacom.com/global/global-6.5.tar.gz" + maintainers = ['gaber'] + + version('6.6.6', sha256='758078afff98d4c051c58785c7ada3ed1977fabb77f8897ff657b71cc62d4d5d') version('6.6.4', sha256='987e8cb956c53f8ebe4453b778a8fde2037b982613aba7f3e8e74bcd05312594') version('6.5', sha256='4afd12db1aa600277b39113cc2d61dc59bd6c6b4ee8033da8bb6dd0c39a4c6a9') From a53f4c36c637beb41c1d31bcc2acb4028c2cce64 Mon Sep 17 00:00:00 2001 From: Robert Mijakovic Date: Fri, 9 Jul 2021 17:02:45 +0200 Subject: [PATCH 040/289] util-macros: new versions, 1.19.2/3 (#24612) Co-authored-by: Robert Mijakovic --- var/spack/repos/builtin/packages/util-macros/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/util-macros/package.py b/var/spack/repos/builtin/packages/util-macros/package.py index 4fa98bc32b6..6a6c671ec58 100644 --- a/var/spack/repos/builtin/packages/util-macros/package.py +++ b/var/spack/repos/builtin/packages/util-macros/package.py @@ -14,6 +14,10 @@ class UtilMacros(AutotoolsPackage, XorgPackage): homepage = "http://cgit.freedesktop.org/xorg/util/macros/" xorg_mirror_path = "util/util-macros-1.19.1.tar.bz2" + maintainers = ['robert-mijakovic'] + + version('1.19.3', sha256='0f812e6e9d2786ba8f54b960ee563c0663ddbe2434bf24ff193f5feab1f31971') + version('1.19.2', sha256='d7e43376ad220411499a79735020f9d145fdc159284867e99467e0d771f3e712') version('1.19.1', sha256='18d459400558f4ea99527bc9786c033965a3db45bf4c6a32eefdc07aa9e306a6') version('1.19.0', sha256='2835b11829ee634e19fa56517b4cfc52ef39acea0cd82e15f68096e27cbed0ba') From b3bdc2ef38e3ed4ce4462a63354c8a39bc0368b8 Mon Sep 17 00:00:00 2001 From: Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> Date: Fri, 9 Jul 2021 11:11:13 -0400 Subject: [PATCH 041/289] heffte: add v2.1.0 (#24599) --- .../repos/builtin/packages/heffte/package.py | 34 +++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py index 881280847b7..a253a6cd238 100644 --- a/var/spack/repos/builtin/packages/heffte/package.py +++ b/var/spack/repos/builtin/packages/heffte/package.py @@ -6,7 +6,7 @@ from spack import * -class Heffte(CMakePackage): +class Heffte(CMakePackage, CudaPackage, ROCmPackage): """Highly Efficient FFT for Exascale""" homepage = "https://bitbucket.org/icl/heffte" @@ -18,6 +18,7 @@ class Heffte(CMakePackage): test_requires_compiler = True version('develop', branch='master') + version('2.1.0', sha256='527a3e21115231715a0342afdfaf6a8878d2dd0f02f03c92b53692340fd940b9') version('2.0.0', sha256='12f2b49a1a36c416eac174cf0cc50e729d56d68a9f68886d8c34bd45a0be26b6') version('1.0', sha256='0902479fb5b1bad01438ca0a72efd577a3529c3d8bad0028f3c18d3a4935ca74') version('0.2', sha256='4e76ae60982b316c2e873b2e5735669b22620fefa1fc82f325cdb6989bec78d1') @@ -29,7 +30,6 @@ class Heffte(CMakePackage): variant('shared', default=True, description='Builds with shared libraries') variant('fftw', default=False, description='Builds with support for FFTW backend') variant('mkl', default=False, description='Builds with support for MKL backend') - variant('cuda', default=False, description='Builds with support for GPUs via CUDA') variant('magma', default=False, description='Use helper methods from the UTK MAGMA library') variant('python', default=False, description='Install the Python bindings') variant('fortran', default=False, description='Install the Fortran modules') @@ -40,10 +40,11 @@ class Heffte(CMakePackage): depends_on('py-numba', when='+python+cuda', type=('build', 'run')) extends('python', when='+python', type=('build', 'run')) - conflicts('~fftw', when='~mkl~cuda') # requires at least one backend + conflicts('~fftw', when='@:2.1.0~mkl~cuda') # requires at least one backend conflicts('+fftw', when='+mkl@:1.0') # old API supports at most one CPU backend conflicts('^openmpi~cuda', when='+cuda') # +cuda requires CUDA enabled OpenMPI conflicts('~cuda', when='+magma') # magma requires CUDA or HIP + conflicts('+rocm', when='@:2.1.0') # heffte+rocm is in in development in spack conflicts('+python', when="@:1.0") # python support was added post v1.0 conflicts('+fortran', when="@:1.0") # fortran support was added post v1.0 conflicts('+magma', when="@:1.0") # magma support was added post v1.0 @@ -51,14 +52,19 @@ class Heffte(CMakePackage): depends_on('mpi', type=('build', 'run')) depends_on('fftw@3.3.8:', when="+fftw", type=('build', 'run')) - depends_on('intel@16.0:', when="+mkl", type=('build', 'run')) + depends_on('intel-mkl@2018.0.128:', when="+mkl", type=('build', 'run')) depends_on('cuda@8.0:', when="+cuda", type=('build', 'run')) + depends_on('hip@3.8.0:', when='+rocm') + depends_on('rocfft@3.8.0:', when='+rocm') depends_on('magma@2.5.3:', when="+cuda+magma", type=('build', 'run')) + examples_src_dir = 'examples' + def cmake_args(self): - return [ + args = [ self.define_from_variant('BUILD_SHARED_LIBS', 'shared'), self.define_from_variant('Heffte_ENABLE_CUDA', 'cuda'), + self.define_from_variant('Heffte_ENABLE_ROCM', 'rocm'), self.define_from_variant('Heffte_ENABLE_FFTW', 'fftw'), self.define_from_variant('Heffte_ENABLE_MKL', 'mkl'), self.define_from_variant('Heffte_ENABLE_MAGMA', 'magma'), @@ -68,7 +74,23 @@ def cmake_args(self): 'ON' if ('+cuda' in self.spec and '+fftw' in self.spec) else 'OFF'), ] - examples_src_dir = 'examples' + if '+cuda' in self.spec: + cuda_arch = self.spec.variants['cuda_arch'].value + if len(cuda_arch) > 0 or cuda_arch[0] != 'none': + nvcc_flags = "" + for nvflag in self.cuda_flags(cuda_arch): + nvcc_flags += "{0};".format(nvflag) + + args.append('-DCUDA_NVCC_FLAGS={0}'.format(nvcc_flags)) + + if '+rocm' in self.spec: + args.append('-DCMAKE_CXX_COMPILER={0}'.format(self.spec['hip'].hipcc)) + + rocm_arch = self.spec.variants['amdgpu_target'].value + if 'none' not in rocm_arch: + args.append('-DCMAKE_CXX_FLAGS={0}'.format(self.hip_flags(rocm_arch))) + + return args @run_after('install') def cache_test_sources(self): From 8cc54036b50f2eb783a7587876ef031fc03a4cf6 Mon Sep 17 00:00:00 2001 From: Robert Mijakovic Date: Fri, 9 Jul 2021 17:12:00 +0200 Subject: [PATCH 042/289] c-blosc2: adds v2.0.1 (#24581) Co-authored-by: Robert Mijakovic Co-authored-by: Axel Huebl --- var/spack/repos/builtin/packages/c-blosc2/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/c-blosc2/package.py b/var/spack/repos/builtin/packages/c-blosc2/package.py index 82206d28fe6..118220eeda7 100644 --- a/var/spack/repos/builtin/packages/c-blosc2/package.py +++ b/var/spack/repos/builtin/packages/c-blosc2/package.py @@ -11,13 +11,13 @@ class CBlosc2(CMakePackage): other bells and whistles""" homepage = "http://www.blosc.org" - url = "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.0.0.rc1.tar.gz" + url = "https://github.com/Blosc/c-blosc2/archive/refs/tags/v2.0.1.tar.gz" git = "https://github.com/Blosc/c-blosc2.git" - maintainers = ['ax3l'] + maintainers = ['ax3l', 'robert-mijakovic'] version('develop', branch='master') - version('2.0.0.rc1', sha256='c30b72af5446f052bad1791000e5a44d156c96b0e39b4bc8e9f97a013c7d1b69') + version('2.0.1', sha256='35b93dfed479b1dfd9372d41d7843b60254ed1d71792577b95e489c28705874f') variant('avx2', default=True, description='Enable AVX2 support') From 7b7f758db373c4299aeb0f0bdd3cfe36a7378d72 Mon Sep 17 00:00:00 2001 From: Hadrien G Date: Fri, 9 Jul 2021 17:13:35 +0200 Subject: [PATCH 043/289] acts: add v9.01.00 (#24570) --- var/spack/repos/builtin/packages/acts/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index 605f7ce232b..5feadd078fe 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -38,6 +38,7 @@ class Acts(CMakePackage, CudaPackage): # Supported Acts versions version('main', branch='main') version('master', branch='main', deprecated=True) # For compatibility + version('9.01.0', commit='bf8fd4c03dd94f497d8501df510d8f6a48434afd') version('9.00.1', commit='7d59bc508d898d2cb67ba05a7150a978b9fcc32d') version('9.00.0', commit='e6e3092bf3a9411aac7c11a24d7586abddb75d59') version('8.03.0', commit='601c0a18b6738cae81c3e23422cfeb3ec7bddce9') From 0edc55adc2356cf2d953a17d74eb18a5e1300c91 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Fri, 9 Jul 2021 11:30:00 -0400 Subject: [PATCH 044/289] scotch: default to not installing vendored metis/parmetis (#24785) --- .../repos/builtin/packages/scotch/package.py | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 770f2f4858b..3e7c6e988f4 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -10,7 +10,7 @@ class Scotch(Package): """Scotch is a software package for graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering.""" - homepage = "http://scotch.gforge.inria.fr/" + homepage = "https://gitlab.inria.fr/scotch/scotch" git = "https://gitlab.inria.fr/scotch/scotch.git" url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.4.tar.gz" list_url = "http://gforge.inria.fr/frs/?group_id=248" @@ -33,8 +33,8 @@ class Scotch(Package): description='Activate the compilation of esmumps needed by mumps') variant('shared', default=True, description='Build a shared version of the library') - variant('metis', default=True, - description='Build metis and parmetis wrapper libraries') + variant('metis', default=False, + description='Expose vendored METIS/ParMETIS libraries and wrappers') variant('int64', default=False, description='Use int64_t for SCOTCH_Num typedef') @@ -51,6 +51,11 @@ class Scotch(Package): patch('libscotchmetis-return-6.0.5a.patch', when='@6.0.5a') + # Vendored dependency of METIS/ParMETIS conflicts with standard + # installations + conflicts('^metis', when='+metis') + conflicts('^parmetis', when='+metis') + # NOTE: In cross-compiling environment parallel build # produces weird linker errors. parallel = False @@ -116,6 +121,12 @@ def configure(self): '-Drestrict=__restrict' ]) + if '~metis' in self.spec: + # Scotch requires METIS to build, but includes its own patched, + # vendored dependency. Prefix its internal symbols so they won't + # conflict with another installation. + cflags.append('-DSCOTCH_METIS_PREFIX') + # Library Build Type # if '+shared' in self.spec: if self.spec.satisfies('platform=darwin'): @@ -215,7 +226,7 @@ def install(self, spec, prefix): with working_dir('src'): for target in targets: - # It seams that building ptesmumps in parallel fails, for + # It seems that building ptesmumps in parallel fails, for # version prior to 6.0.0 there is no separated targets force # ptesmumps, this library is built by the ptscotch target. This # should explain the test for the can_make_parallel variable @@ -226,7 +237,7 @@ def install(self, spec, prefix): make(target, parallel=can_make_parallel) lib_ext = dso_suffix if '+shared' in self.spec else 'a' - # It seams easier to remove metis wrappers from the folder that will be + # It seems easier to remove metis wrappers from the folder that will be # installed than to tweak the Makefiles if '+metis' not in self.spec: with working_dir('lib'): From 2a858f8f3d18ac22eff6ceccb3ceb44e5ad93486 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Fri, 9 Jul 2021 17:45:46 +0200 Subject: [PATCH 045/289] docker: Fix CentOS 6 build on Docker Hub (#24804) This change make yum usable again on CentOS 6 --- share/spack/docker/centos-6.dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/spack/docker/centos-6.dockerfile b/share/spack/docker/centos-6.dockerfile index 1ba58d66af1..f192c54427f 100644 --- a/share/spack/docker/centos-6.dockerfile +++ b/share/spack/docker/centos-6.dockerfile @@ -9,6 +9,9 @@ ENV DOCKERFILE_BASE=centos \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker +# Make yum usable again with CentOS 6 +RUN curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo + RUN yum update -y \ && yum install -y epel-release \ && yum update -y \ From d734df705a80873dfe49db10ee62efed66471505 Mon Sep 17 00:00:00 2001 From: darmac Date: Fri, 9 Jul 2021 23:49:10 +0800 Subject: [PATCH 046/289] libnids: add new package (#22153) --- .../repos/builtin/packages/libnids/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libnids/package.py diff --git a/var/spack/repos/builtin/packages/libnids/package.py b/var/spack/repos/builtin/packages/libnids/package.py new file mode 100644 index 00000000000..95fc287aef0 --- /dev/null +++ b/var/spack/repos/builtin/packages/libnids/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Libnids(AutotoolsPackage): + """Libnids is a library that provides a functionality of one of + NIDS (Network Intrusion Detection System) components, namely + E-component.""" + + homepage = "http://libnids.sourceforge.net/" + url = "https://github.com/MITRECND/libnids/archive/1.25.tar.gz" + git = "https://github.com/MITRECND/libnids.git" + + version('master', branch='master') + version('1.25', sha256='47aa634bd0cdad81e092fac3aef6f12ee346c2f536a1eff4d3d5dacdb6dfcec1') + + depends_on('libpcap') + depends_on('libnet') + depends_on('glib@2.2.0:') From b4e757dc35e1e1b0c19bf1feb93b95a61b76b888 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 9 Jul 2021 10:51:52 -0500 Subject: [PATCH 047/289] py-fuzzywuzzy: add new package (#24789) --- .../builtin/packages/py-fuzzywuzzy/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-fuzzywuzzy/package.py diff --git a/var/spack/repos/builtin/packages/py-fuzzywuzzy/package.py b/var/spack/repos/builtin/packages/py-fuzzywuzzy/package.py new file mode 100644 index 00000000000..f002467a9aa --- /dev/null +++ b/var/spack/repos/builtin/packages/py-fuzzywuzzy/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyFuzzywuzzy(PythonPackage): + """Fuzzy string matching in python.""" + + homepage = "https://github.com/seatgeek/fuzzywuzzy" + pypi = "fuzzywuzzy/fuzzywuzzy-0.18.0.tar.gz" + + version('0.18.0', sha256='45016e92264780e58972dca1b3d939ac864b78437422beecebb3095f8efd00e8') + + variant('speedup', default=False, description='Provide a 4-10x speedup') + + depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-python-levenshtein@0.12:', when='+speedup', type=('build', 'run')) From 4037a94d1e974d4f79a148a8ec44e9622e81ffdc Mon Sep 17 00:00:00 2001 From: Chris White Date: Fri, 9 Jul 2021 09:20:54 -0700 Subject: [PATCH 048/289] Remove unnecessary compiler id override for XL (#24799) --- lib/spack/spack/build_systems/cached_cmake.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/spack/spack/build_systems/cached_cmake.py b/lib/spack/spack/build_systems/cached_cmake.py index c143c824de6..faaabb184f3 100644 --- a/lib/spack/spack/build_systems/cached_cmake.py +++ b/lib/spack/spack/build_systems/cached_cmake.py @@ -108,21 +108,6 @@ def initconfig_compiler_entries(self): if fflags: entries.append(cmake_cache_string("CMAKE_Fortran_FLAGS", fflags)) - # Override XL compiler family - familymsg = ("Override to proper compiler family for XL") - if "xlf" in (self.compiler.fc or ''): # noqa: F821 - entries.append(cmake_cache_string( - "CMAKE_Fortran_COMPILER_ID", "XL", - familymsg)) - if "xlc" in self.compiler.cc: # noqa: F821 - entries.append(cmake_cache_string( - "CMAKE_C_COMPILER_ID", "XL", - familymsg)) - if "xlC" in self.compiler.cxx: # noqa: F821 - entries.append(cmake_cache_string( - "CMAKE_CXX_COMPILER_ID", "XL", - familymsg)) - return entries def initconfig_mpi_entries(self): From 72585afcef41fd89aac5d9ac3ebde4fe19abe1fa Mon Sep 17 00:00:00 2001 From: QuellynSnead Date: Fri, 9 Jul 2021 10:25:36 -0600 Subject: [PATCH 049/289] hypre: Add new versions (#24625) * hypre: Add releases 2.21.0 and 2.22.0 --- var/spack/repos/builtin/packages/hypre/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py index 3986bd194f0..674cf7f98c3 100644 --- a/var/spack/repos/builtin/packages/hypre/package.py +++ b/var/spack/repos/builtin/packages/hypre/package.py @@ -23,6 +23,8 @@ class Hypre(Package, CudaPackage): test_requires_compiler = True version('develop', branch='master') + version('2.22.0', sha256='2c786eb5d3e722d8d7b40254f138bef4565b2d4724041e56a8fa073bda5cfbb5') + version('2.21.0', sha256='e380f914fe7efe22afc44cdf553255410dc8a02a15b2e5ebd279ba88817feaf5') version('2.20.0', sha256='5be77b28ddf945c92cde4b52a272d16fb5e9a7dc05e714fc5765948cba802c01') version('2.19.0', sha256='466b19d8a86c69989a237f6f03f20d35c0c63a818776d2cd071b0a084cffeba5') version('2.18.2', sha256='28007b5b584eaf9397f933032d8367788707a2d356d78e47b99e551ab10cc76a') From 0e177cb95fcc9aecdc7932632848b8425e20e549 Mon Sep 17 00:00:00 2001 From: Zack Galbreath Date: Fri, 9 Jul 2021 12:39:16 -0400 Subject: [PATCH 050/289] ci: tolerate 'InvalidAccessKeyId' (#24741) Add 'InvalidAccessKeyId' to the list of error messages we expect and tolerate in push_mirror_contents() --- lib/spack/spack/ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index 2ebbb842c5e..7f3d88a9257 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -1395,7 +1395,7 @@ def push_mirror_contents(env, spec, yaml_path, mirror_url, sign_binaries): # BaseException # object err_msg = 'Error msg: {0}'.format(inst) - if 'Access Denied' in err_msg: + if any(x in err_msg for x in ['Access Denied', 'InvalidAccessKeyId']): tty.msg('Permission problem writing to {0}'.format( mirror_url)) tty.msg(err_msg) From c6ffec1d7867a965cb352c726d73dd23f51fd1d4 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Fri, 9 Jul 2021 20:04:36 +0200 Subject: [PATCH 051/289] py-markupsafe: add 2.0.1 (#24766) * py-markupsafe: add 2.0.1 * Update var/spack/repos/builtin/packages/py-markupsafe/package.py Co-authored-by: Adam J. Stewart Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/py-markupsafe/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-markupsafe/package.py b/var/spack/repos/builtin/packages/py-markupsafe/package.py index ae95876b9d1..c6c5157dce2 100644 --- a/var/spack/repos/builtin/packages/py-markupsafe/package.py +++ b/var/spack/repos/builtin/packages/py-markupsafe/package.py @@ -12,9 +12,10 @@ class PyMarkupsafe(PythonPackage): implement automatic string escaping. It is used by Jinja 2, the Mako templating engine, the Pylons web framework and many more.""" - homepage = "http://www.pocoo.org/projects/markupsafe/" + homepage = "https://markupsafe.palletsprojects.com" pypi = "MarkupSafe/MarkupSafe-1.1.1.tar.gz" + version('2.0.1', sha256='594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a') version('1.1.1', sha256='29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b') version('1.0', sha256='a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665') version('0.23', sha256='a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3') @@ -23,5 +24,6 @@ class PyMarkupsafe(PythonPackage): version('0.20', sha256='f6cf3bd233f9ea6147b21c7c02cac24e5363570ce4fd6be11dab9f499ed6a7d8') version('0.19', sha256='62fcc5d641df8b5ad271ebbd6b77a19cd92eceba1e1a990de4e96c867789f037') + depends_on('python@3.6:', when='@2:', type=('build', 'run')) depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) depends_on('py-setuptools', type='build') From c9fe3af92d453e596c92c55a59a8189f678fb24e Mon Sep 17 00:00:00 2001 From: Asher Mancinelli Date: Fri, 9 Jul 2021 12:13:22 -0600 Subject: [PATCH 052/289] toml11: New package (#24620) --- .../repos/builtin/packages/toml11/package.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/toml11/package.py diff --git a/var/spack/repos/builtin/packages/toml11/package.py b/var/spack/repos/builtin/packages/toml11/package.py new file mode 100644 index 00000000000..200e833e3ca --- /dev/null +++ b/var/spack/repos/builtin/packages/toml11/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * + + +class Toml11(CMakePackage): + """toml11 is a C++11 (or later) header-only toml parser/encoder depending + only on C++ standard library.""" + + homepage = "https://github.com/ToruNiina/toml11" + url = "https://github.com/ToruNiina/toml11/archive/refs/tags/v3.7.0.tar.gz" + + maintainers = ['ashermancinelli', 'ToruNiina'] + + version('3.7.0', sha256='a0b6bec77c0e418eea7d270a4437510884f2fe8f61e7ab121729624f04c4b58e') + version('3.6.1', sha256='ca4c390ed8da0d77ae6eca30e70ab0bf5cc92adfc1bc2f71a2066bc5656d8d96') + version('3.6.0', sha256='39e8d651db346ae8c7e3b39d6338a37232b9af3bba36ade45b241bf105c2226c') + version('3.5.0', sha256='fc613874c6e80dc740134a7353cf23c7f834b59cd601af84ab535ee16a53b1c3') + version('3.4.0', sha256='bc6d733efd9216af8c119d8ac64a805578c79cc82b813e4d1d880ca128bd154d') + version('3.3.1', sha256='0c1b29e1a2873a1b1f6d0865a2966a2d3fd9155aeccb6139cd5af22f70b0b08f') + version('3.3.0', sha256='b29995475922fae3095445219d36733ef18976abdc85685d0804ee3ea04f09c0') + version('3.2.1', sha256='370f17409cfcbf3f629728ed7ec2e1573544058615fb5d066f4f7c14693143a9') + version('3.2.0', sha256='3d54cac38ea24477190e0535377e824bf06562970ef4d35b59aa9729437e1019') + version('3.1.0', sha256='3a118f32e5343998f37be9807c72fd11c3168fe12a5b1abfdc0f1e60de6380a4') From 78f65e7ce0e3ddbd73877179e0266abfc595db17 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Fri, 9 Jul 2021 15:43:28 -0700 Subject: [PATCH 053/289] openPMD-api: rename develop (#24810) * openPMD-api: rename develop Rename to match known Spack version comparison schemes: ``` develop>main>master>head>trunk>9999>0>z>a ``` Currently, the hdf5 patch that is pre-0.14.0 is also applied to `dev`, which naturally fails (already applied). * fix dev in warpx --- var/spack/repos/builtin/packages/openpmd-api/package.py | 2 +- var/spack/repos/builtin/packages/warpx/package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/openpmd-api/package.py b/var/spack/repos/builtin/packages/openpmd-api/package.py index 43ac393d294..61f0cea5cab 100644 --- a/var/spack/repos/builtin/packages/openpmd-api/package.py +++ b/var/spack/repos/builtin/packages/openpmd-api/package.py @@ -16,7 +16,7 @@ class OpenpmdApi(CMakePackage): maintainers = ['ax3l'] # C++14 up until here - version('dev', branch='dev') + version('develop', branch='dev') # temporary, pre 0.14.0 version for HiPACE++ version('hipace', commit='ac083025ee662469b8cad1adf93eef48cde35f58') version('0.13.4', sha256='46c013be5cda670f21969675ce839315d4f5ada0406a6546a91ec3441402cf5e') diff --git a/var/spack/repos/builtin/packages/warpx/package.py b/var/spack/repos/builtin/packages/warpx/package.py index 368308a2b12..06ab9e65112 100644 --- a/var/spack/repos/builtin/packages/warpx/package.py +++ b/var/spack/repos/builtin/packages/warpx/package.py @@ -84,7 +84,7 @@ class Warpx(CMakePackage): depends_on('fftw +mpi', when='+psatd +mpi compute=omp') depends_on('lapackpp', when='+psatd dims=rz') depends_on('mpi', when='+mpi') - depends_on('openpmd-api@0.13.1:,dev', when='+openpmd') + depends_on('openpmd-api@0.13.1:', when='+openpmd') depends_on('openpmd-api ~mpi', when='+openpmd ~mpi') depends_on('openpmd-api +mpi', when='+openpmd +mpi') depends_on('pkgconfig', type='build', when='+psatd compute=omp') From d14520d6d86d2230be337a566e96a7951676d179 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 10 Jul 2021 02:45:30 +0200 Subject: [PATCH 054/289] docker: remove boto3 from CentOS 6 since it requires and updated pip (#24813) --- share/spack/docker/centos-6.dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/share/spack/docker/centos-6.dockerfile b/share/spack/docker/centos-6.dockerfile index f192c54427f..b0186f2ff83 100644 --- a/share/spack/docker/centos-6.dockerfile +++ b/share/spack/docker/centos-6.dockerfile @@ -35,7 +35,6 @@ RUN yum update -y \ tcl \ unzip \ which \ - && pip install boto3 \ && rm -rf /var/cache/yum \ && yum clean all From 556975564cd49d81b50a120a85eb3b91b60c3bb8 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Fri, 9 Jul 2021 19:05:30 -0600 Subject: [PATCH 055/289] votca-tools: fix build with newer gcc/glibc (#24815) --- var/spack/repos/builtin/packages/votca-tools/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/votca-tools/package.py b/var/spack/repos/builtin/packages/votca-tools/package.py index 21150834a3b..4bfc91b707d 100644 --- a/var/spack/repos/builtin/packages/votca-tools/package.py +++ b/var/spack/repos/builtin/packages/votca-tools/package.py @@ -35,6 +35,8 @@ class VotcaTools(CMakePackage): # https://github.com/votca/tools/pull/229, fix mkl in exported target patch("https://github.com/votca/tools/pull/229.patch", sha256="250d0b679e5d3104e3c8d6adf99751b71386c7ed4cbdae1c75408717ef3f401f", when="@1.6:1.6.0+mkl") + # https://github.com/votca/tools/pull/361, fix build with newer glibc/gcc, fixed in stable and 2021.1 + patch("https://github.com/votca/tools/commit/6bb7e35ba7d1a31247eafb323be2777ec0439cfe.patch", sha256="3c9fa5ac9cf45c54ac475bcb22350793efaccd6b5154e3d30c24b8aa754fe47b", when="@2021") variant('mkl', default=False, description='Build with MKL support') conflicts('+mkl', when='@1.4:1.5.9999') From ebf2076755beabea00de0ff1588c6eec6af2b304 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Fri, 9 Jul 2021 18:16:48 -0700 Subject: [PATCH 056/289] spec.splice: properly handle cached hash invalidations (#24795) * spec.splice: properly handle cached hash invalidations * make package_hash a cached hash on the spec --- lib/spack/spack/hash_types.py | 13 ++++- lib/spack/spack/spec.py | 66 +++++++++++++++++++------- lib/spack/spack/test/spec_semantics.py | 30 ++++++++++++ 3 files changed, 91 insertions(+), 18 deletions(-) diff --git a/lib/spack/spack/hash_types.py b/lib/spack/spack/hash_types.py index 554665e24a9..5e122c308b5 100644 --- a/lib/spack/spack/hash_types.py +++ b/lib/spack/spack/hash_types.py @@ -19,12 +19,15 @@ class SpecHashDescriptor(object): We currently use different hashes for different use cases. """ - hash_types = ('_dag_hash', '_build_hash', '_full_hash') + hash_types = ('_dag_hash', '_build_hash', '_full_hash', '_package_hash') - def __init__(self, deptype=('link', 'run'), package_hash=False, attr=None): + def __init__(self, deptype=('link', 'run'), package_hash=False, attr=None, + override=None): self.deptype = dp.canonical_deptype(deptype) self.package_hash = package_hash self.attr = attr + # Allow spec hashes to have an alternate computation method + self.override = override #: Default Hash descriptor, used by Spec.dag_hash() and stored in the DB. @@ -40,3 +43,9 @@ def __init__(self, deptype=('link', 'run'), package_hash=False, attr=None): #: Full hash used in build pipelines to determine when to rebuild packages. full_hash = SpecHashDescriptor( deptype=('build', 'link', 'run'), package_hash=True, attr='_full_hash') + + +#: Package hash used as part of full hash +package_hash = SpecHashDescriptor( + deptype=(), package_hash=True, attr='_package_hash', + override=lambda s: s.package.content_hash()) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 7a69dad8819..934d3317fd8 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -1030,9 +1030,8 @@ class Spec(object): #: Cache for spec's prefix, computed lazily in the corresponding property _prefix = None - def __init__(self, spec_like=None, - normal=False, concrete=False, external_path=None, - external_modules=None, full_hash=None): + def __init__(self, spec_like=None, normal=False, + concrete=False, external_path=None, external_modules=None): """Create a new Spec. Arguments: @@ -1046,8 +1045,6 @@ def __init__(self, spec_like=None, self._concrete = concrete self.external_path = external_path self.external_module = external_module - self._full_hash = full_hash - """ # Copy if spec_like is a Spec. @@ -1068,6 +1065,8 @@ def __init__(self, spec_like=None, self._hash = None self._build_hash = None + self._full_hash = None + self._package_hash = None self._dunder_hash = None self._package = None @@ -1082,7 +1081,6 @@ def __init__(self, spec_like=None, self._concrete = concrete self.external_path = external_path self.external_modules = Spec._format_module_list(external_modules) - self._full_hash = full_hash # Older spack versions did not compute full_hash or build_hash, # and we may not have the necessary information to recompute them @@ -1501,6 +1499,8 @@ def _spec_hash(self, hash): """ # TODO: curently we strip build dependencies by default. Rethink # this when we move to using package hashing on all specs. + if hash.override is not None: + return hash.override(self) node_dict = self.to_node_dict(hash=hash) yaml_text = syaml.dump(node_dict, default_flow_style=True) return spack.util.hash.b32_hash(yaml_text) @@ -1528,6 +1528,10 @@ def _cached_hash(self, hash, length=None): return hash_string[:length] + def package_hash(self): + """Compute the hash of the contents of the package for this node""" + return self._cached_hash(ht.package_hash) + def dag_hash(self, length=None): """This is Spack's default hash, used to identify installations. @@ -1653,7 +1657,7 @@ def to_node_dict(self, hash=ht.dag_hash): d['patches'] = variant._patches_in_order_of_appearance if hash.package_hash: - package_hash = self.package.content_hash() + package_hash = self.package_hash() # Full hashes are in bytes if (not isinstance(package_hash, six.text_type) @@ -1822,6 +1826,7 @@ def from_node_dict(node): spec._hash = node.get('hash', None) spec._build_hash = node.get('build_hash', None) spec._full_hash = node.get('full_hash', None) + spec._package_hash = node.get('package_hash', None) if 'version' in node or 'versions' in node: spec.versions = vn.VersionList.from_dict(node) @@ -3441,12 +3446,14 @@ def _dup(self, other, deps=True, cleardeps=True, caches=None): self._dunder_hash = other._dunder_hash self._normal = other._normal self._full_hash = other._full_hash + self._package_hash = other._package_hash else: self._hash = None self._build_hash = None self._dunder_hash = None self._normal = False self._full_hash = None + self._package_hash = None return changed @@ -4281,19 +4288,22 @@ def splice(self, other, transitive): # _dependents of these specs should not be trusted. # Variants may also be ignored here for now... + # Keep all cached hashes because we will invalidate the ones that need + # invalidating later, and we don't want to invalidate unnecessarily + if transitive: - self_nodes = dict((s.name, s.copy(deps=False)) + self_nodes = dict((s.name, s.copy(deps=False, caches=True)) for s in self.traverse(root=True) if s.name not in other) - other_nodes = dict((s.name, s.copy(deps=False)) + other_nodes = dict((s.name, s.copy(deps=False, caches=True)) for s in other.traverse(root=True)) else: # If we're not doing a transitive splice, then we only want the # root of other. - self_nodes = dict((s.name, s.copy(deps=False)) + self_nodes = dict((s.name, s.copy(deps=False, caches=True)) for s in self.traverse(root=True) if s.name != other.name) - other_nodes = {other.name: other.copy(deps=False)} + other_nodes = {other.name: other.copy(deps=False, caches=True)} nodes = other_nodes.copy() nodes.update(self_nodes) @@ -4314,17 +4324,41 @@ def splice(self, other, transitive): if any(dep not in other_nodes for dep in dependencies): nodes[name].build_spec = other[name].build_spec - # Clear cached hashes - nodes[self.name].clear_cached_hashes() + ret = nodes[self.name] + + # Clear cached hashes for all affected nodes + # Do not touch unaffected nodes + for dep in ret.traverse(root=True, order='post'): + opposite = other_nodes if dep.name in self_nodes else self_nodes + if any(name in dep for name in opposite.keys()): + # Record whether hashes are already cached + # So we don't try to compute a hash from insufficient + # provenance later + has_build_hash = getattr(dep, ht.build_hash.attr, None) + has_full_hash = getattr(dep, ht.full_hash.attr, None) + + # package hash cannot be affected by splice + dep.clear_cached_hashes(ignore=['_package_hash']) + + # Since this is a concrete spec, we want to make sure hashes + # are cached writing specs only writes cached hashes in case + # the spec is too old to have full provenance for these hashes, + # so we can't rely on doing it at write time. + if has_build_hash: + _ = dep.build_hash() + if has_full_hash: + _ = dep.full_hash() + return nodes[self.name] - def clear_cached_hashes(self): + def clear_cached_hashes(self, ignore=()): """ Clears all cached hashes in a Spec, while preserving other properties. """ for attr in ht.SpecHashDescriptor.hash_types: - if hasattr(self, attr): - setattr(self, attr, None) + if attr not in ignore: + if hasattr(self, attr): + setattr(self, attr, None) def __hash__(self): # If the spec is concrete, we leverage the DAG hash and just use diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py index c21be384911..acf0116cfb0 100644 --- a/lib/spack/spack/test/spec_semantics.py +++ b/lib/spack/spack/test/spec_semantics.py @@ -1027,6 +1027,36 @@ def test_splice(self, transitive): # Finally, the spec should know it's been spliced: assert out.spliced + @pytest.mark.parametrize('transitive', [True, False]) + def test_splice_with_cached_hashes(self, transitive): + spec = Spec('splice-t') + dep = Spec('splice-h+foo') + spec.concretize() + dep.concretize() + + # monkeypatch hashes so we can test that they are cached + spec._full_hash = 'aaaaaa' + spec._build_hash = 'aaaaaa' + dep._full_hash = 'bbbbbb' + dep._build_hash = 'bbbbbb' + spec['splice-h']._full_hash = 'cccccc' + spec['splice-h']._build_hash = 'cccccc' + spec['splice-z']._full_hash = 'dddddd' + spec['splice-z']._build_hash = 'dddddd' + dep['splice-z']._full_hash = 'eeeeee' + dep['splice-z']._build_hash = 'eeeeee' + + out = spec.splice(dep, transitive=transitive) + out_z_expected = (dep if transitive else spec)['splice-z'] + + assert out.full_hash() != spec.full_hash() + assert (out['splice-h'].full_hash() == dep.full_hash()) == transitive + assert out['splice-z'].full_hash() == out_z_expected.full_hash() + + assert out.build_hash() != spec.build_hash() + assert (out['splice-h'].build_hash() == dep.build_hash()) == transitive + assert out['splice-z'].build_hash() == out_z_expected.build_hash() + @pytest.mark.parametrize('transitive', [True, False]) def test_splice_input_unchanged(self, transitive): spec = Spec('splice-t').concretized() From 775c8223c34f96f23c6ed314c085b0307b1ecd03 Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Fri, 9 Jul 2021 19:22:26 -0600 Subject: [PATCH 057/289] debug: initial global debug flag support (#24285) The developer can export environment variables that are seen by the compiler wrapper to then add the flags --- lib/spack/docs/developer_guide.rst | 32 +++++++++++++++++++++++ lib/spack/env/cc | 42 ++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst index 0ceb5d84a14..fe67b909504 100644 --- a/lib/spack/docs/developer_guide.rst +++ b/lib/spack/docs/developer_guide.rst @@ -785,6 +785,38 @@ Unit tests Unit testing ------------ +--------------------- +Developer environment +--------------------- + +.. warning:: + + This is an experimental feature. It is expected to change and you should + not use it in a production environment. + + +When installing a package, we currently have support to export environment +variables to specify adding debug flags to the build. By default, a package +install will build without any debug flag. However, if you want to add them, +you can export: + +.. code-block:: console + + export SPACK_ADD_DEBUG_FLAGS=true + spack install zlib + + +If you want to add custom flags, you should export an additional variable: + +.. code-block:: console + + export SPACK_ADD_DEBUG_FLAGS=true + export SPACK_DEBUG_FLAGS="-g" + spack install zlib + +These environment variables will eventually be integrated into spack so +they are set from the command line. + ------------------ Developer commands ------------------ diff --git a/lib/spack/env/cc b/lib/spack/env/cc index bd479f05ecb..5157a5f3815 100755 --- a/lib/spack/env/cc +++ b/lib/spack/env/cc @@ -40,6 +40,14 @@ parameters=( SPACK_SYSTEM_DIRS ) +# Optional parameters that aren't required to be set + +# Boolean (true/false/custom) if we want to add debug flags +# SPACK_ADD_DEBUG_FLAGS + +# If a custom flag is requested, it will be defined +# SPACK_DEBUG_FLAGS + # The compiler input variables are checked for sanity later: # SPACK_CC, SPACK_CXX, SPACK_F77, SPACK_FC # The default compiler flags are passed from these variables: @@ -87,6 +95,25 @@ for param in "${parameters[@]}"; do fi done +# Check if optional parameters are defined +# If we aren't asking for debug flags, don't add them +if [[ -z ${SPACK_ADD_DEBUG_FLAGS+x} ]]; then + SPACK_ADD_DEBUG_FLAGS="false" +fi + +# SPACK_ADD_DEBUG_FLAGS must be true/false/custom +is_valid="false" +for param in "true" "false" "custom"; do + if [ "$param" == "$SPACK_ADD_DEBUG_FLAGS" ]; then + is_valid="true" + fi +done + +# Exit with error if we are given an incorrect value +if [ "$is_valid" == "false" ]; then + die "SPACK_ADD_DEBUG_FLAGS, if defined, must be one of 'true' 'false' or 'custom'" +fi + # Figure out the type of compiler, the language, and the mode so that # the compiler script knows what to do. # @@ -106,30 +133,35 @@ comp="CC" case "$command" in cpp) mode=cpp + debug_flags="-g" ;; cc|c89|c99|gcc|clang|armclang|icc|icx|pgcc|nvc|xlc|xlc_r|fcc) command="$SPACK_CC" language="C" comp="CC" lang_flags=C + debug_flags="-g" ;; c++|CC|g++|clang++|armclang++|icpc|icpx|pgc++|nvc++|xlc++|xlc++_r|FCC) command="$SPACK_CXX" language="C++" comp="CXX" lang_flags=CXX + debug_flags="-g" ;; ftn|f90|fc|f95|gfortran|flang|armflang|ifort|ifx|pgfortran|nvfortran|xlf90|xlf90_r|nagfor|frt) command="$SPACK_FC" language="Fortran 90" comp="FC" lang_flags=F + debug_flags="-g" ;; f77|xlf|xlf_r|pgf77) command="$SPACK_F77" language="Fortran 77" comp="F77" lang_flags=F + debug_flags="-g" ;; ld) mode=ld @@ -415,6 +447,16 @@ done # flags=() +# Add debug flags +if [ "${SPACK_ADD_DEBUG_FLAGS}" == "true" ]; then + flags=("${flags[@]}" "${debug_flags}") + +# If a custom flag is requested, derive from environment +elif [ "$SPACK_ADD_DEBUG_FLAGS" == "custom" ]; then + IFS=' ' read -ra SPACK_DEBUG_FLAGS <<< "$SPACK_DEBUG_FLAGS" + flags=("${flags[@]}" "${SPACK_DEBUG_FLAGS[@]}") +fi + # Fortran flags come before CPPFLAGS case "$mode" in cc|ccld) From 084bafe18ca40b9dffe52e9e9b0c0bfcef194b78 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Fri, 9 Jul 2021 22:49:47 -0700 Subject: [PATCH 058/289] coverage: move config from `.coveragerc` to `pyproject.toml` Getting rid of another top-level file. `coverage.py` has supported `pyproject.toml` since version 5.0, and all versions of coverage so far work with python 2.7. We just need to ensure that a version of coverage with the `toml` extra is installed in the test environment. I tested this with `coverage run`, `coverage report`, and `coverage html`. --- .coveragerc | 38 -------------- .github/workflows/unit_tests.yaml | 8 +-- pyproject.toml | 86 ++++++++++++++++++++++--------- 3 files changed, 65 insertions(+), 67 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 94d38d7a2e5..00000000000 --- a/.coveragerc +++ /dev/null @@ -1,38 +0,0 @@ -# -*- conf -*- -# .coveragerc to control coverage.py -[run] -parallel = True -concurrency = multiprocessing -branch = True -source = - bin - lib -omit = - lib/spack/spack/test/* - lib/spack/docs/* - lib/spack/external/* - share/spack/qa/* - -[report] -# Regexes for lines to exclude from consideration -exclude_lines = - # Have to re-enable the standard pragma - pragma: no cover - - # Don't complain about missing debug-only code: - def __repr__ - if self\.debug - - # Don't complain if tests don't hit defensive assertion code: - raise AssertionError - raise NotImplementedError - - # Don't complain if non-runnable code isn't run: - if 0: - if False: - if __name__ == .__main__.: - -ignore_errors = True - -[html] -directory = htmlcov diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index b454c7d935e..c3869757785 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -137,7 +137,7 @@ jobs: sudo apt-get -y install zlib1g-dev libdw-dev libiberty-dev - name: Install Python packages run: | - pip install --upgrade pip six setuptools codecov coverage + pip install --upgrade pip six setuptools codecov coverage[toml] - name: Setup git configuration run: | # Need this for the git tests to succeed. @@ -205,7 +205,7 @@ jobs: sudo apt-get -y install zlib1g-dev libdw-dev libiberty-dev - name: Install Python packages run: | - pip install --upgrade pip six setuptools codecov coverage + pip install --upgrade pip six setuptools codecov coverage[toml] - name: Setup git configuration run: | # Need this for the git tests to succeed. @@ -326,7 +326,7 @@ jobs: make -C ${KCOV_ROOT}/build && sudo make -C ${KCOV_ROOT}/build install - name: Install Python packages run: | - pip install --upgrade pip six setuptools codecov coverage clingo + pip install --upgrade pip six setuptools codecov coverage[toml] clingo - name: Setup git configuration run: | # Need this for the git tests to succeed. @@ -369,7 +369,7 @@ jobs: - name: Install Python packages run: | pip install --upgrade pip six setuptools - pip install --upgrade codecov coverage + pip install --upgrade codecov coverage[toml] pip install --upgrade flake8 isort>=4.3.5 mypy>=0.900 - name: Setup Homebrew packages run: | diff --git a/pyproject.toml b/pyproject.toml index 74b7ec8e1e9..d09e589bed0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,33 +26,69 @@ namespace_packages = true ignore_errors = true ignore_missing_imports = true -[[tool.mypy.overrides]] -module = 'spack.*' -ignore_errors = false -ignore_missing_imports = false + [[tool.mypy.overrides]] + module = 'spack.*' + ignore_errors = false + ignore_missing_imports = false -[[tool.mypy.overrides]] -module = 'packages.*' -ignore_errors = false -ignore_missing_imports = false + [[tool.mypy.overrides]] + module = 'packages.*' + ignore_errors = false + ignore_missing_imports = false -[[tool.mypy.overrides]] -module = 'llnl.*' -ignore_errors = false -ignore_missing_imports = false + [[tool.mypy.overrides]] + module = 'llnl.*' + ignore_errors = false + ignore_missing_imports = false -[[tool.mypy.overrides]] -module = 'spack.test.packages' + [[tool.mypy.overrides]] + module = 'spack.test.packages' + ignore_errors = true + + # ignore errors in fake import path for packages + [[tool.mypy.overrides]] + module = 'spack.pkg.*' + ignore_errors = true + ignore_missing_imports = true + + # jinja has syntax in it that requires python3 and causes a parse error + # skip importing it + [[tool.mypy.overrides]] + module = 'jinja2' + follow_imports = 'skip' + +[tool.coverage.run] +parallel = true +concurrency = ["multiprocessing"] +branch = true +source = ["bin", "lib"] +omit = [ + 'lib/spack/spack/test/*', + 'lib/spack/docs/*', + 'lib/spack/external/*', + 'share/spack/qa/*', +] + +[tool.coverage.report] +# Regexes for lines to exclude from consideration +exclude_lines = [ + # Have to re-enable the standard pragma + 'pragma: no cover', + + # Don't complain about missing debug-only code: + 'def __repr__', + 'if self\.debug', + + # Don't complain if tests don't hit defensive assertion code: + 'raise AssertionError', + 'raise NotImplementedError', + + # Don't complain if non-runnable code isn't run: + 'if 0:', + 'if False:', + 'if __name__ == .__main__.:', +] ignore_errors = true -# ignore errors in fake import path for packages -[[tool.mypy.overrides]] -module = 'spack.pkg.*' -ignore_errors = true -ignore_missing_imports = true - -# jinja has syntax in it that requires python3 and causes a parse error -# skip importing it -[[tool.mypy.overrides]] -module = 'jinja2' -follow_imports = 'skip' +[tool.coverage.html] +directory = "htmlcov" From e0017a66668c855dcf21d5f1e5185f8bdd2963e4 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Sat, 10 Jul 2021 00:49:09 -0600 Subject: [PATCH 059/289] Fix out of date remote spec.yamls while updating the index (#24811) --- lib/spack/spack/binary_distribution.py | 85 +++++++++++++++++++++++--- lib/spack/spack/test/bindist.py | 55 +++++++++++++++++ 2 files changed, 130 insertions(+), 10 deletions(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 6ca15df1229..a9a2cf6af28 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -13,6 +13,7 @@ import sys import tarfile import tempfile +import traceback from contextlib import closing import ruamel.yaml as yaml @@ -27,6 +28,7 @@ import spack.config as config import spack.database as spack_db import spack.fetch_strategy as fs +import spack.hash_types as ht import spack.mirror import spack.relocate as relocate import spack.util.file_cache as file_cache @@ -709,12 +711,6 @@ def generate_package_index(cache_prefix): cache_prefix. This page contains a link for each binary package (.yaml) under cache_prefix. """ - tmpdir = tempfile.mkdtemp() - db_root_dir = os.path.join(tmpdir, 'db_root') - db = spack_db.Database(None, db_dir=db_root_dir, - enable_transaction_locking=False, - record_fields=['spec', 'ref_count', 'in_buildcache']) - try: file_list = ( entry @@ -735,22 +731,90 @@ def generate_package_index(cache_prefix): tty.debug('Retrieving spec.yaml files from {0} to build index'.format( cache_prefix)) + + all_mirror_specs = {} + for file_path in file_list: try: yaml_url = url_util.join(cache_prefix, file_path) tty.debug('fetching {0}'.format(yaml_url)) _, _, yaml_file = web_util.read_from_url(yaml_url) yaml_contents = codecs.getreader('utf-8')(yaml_file).read() - # yaml_obj = syaml.load(yaml_contents) - # s = Spec.from_yaml(yaml_obj) + spec_dict = syaml.load(yaml_contents) s = Spec.from_yaml(yaml_contents) - db.add(s, None) - db.mark(s, 'in_buildcache', True) + all_mirror_specs[s.dag_hash()] = { + 'yaml_url': yaml_url, + 'spec': s, + 'num_deps': len(list(s.traverse(root=False))), + 'binary_cache_checksum': spec_dict['binary_cache_checksum'], + 'buildinfo': spec_dict['buildinfo'], + } except (URLError, web_util.SpackWebError) as url_err: tty.error('Error reading spec.yaml: {0}'.format(file_path)) tty.error(url_err) + sorted_specs = sorted(all_mirror_specs.keys(), + key=lambda k: all_mirror_specs[k]['num_deps']) + + tmpdir = tempfile.mkdtemp() + db_root_dir = os.path.join(tmpdir, 'db_root') + db = spack_db.Database(None, db_dir=db_root_dir, + enable_transaction_locking=False, + record_fields=['spec', 'ref_count', 'in_buildcache']) + try: + tty.debug('Specs sorted by number of dependencies:') + for dag_hash in sorted_specs: + spec_record = all_mirror_specs[dag_hash] + s = spec_record['spec'] + num_deps = spec_record['num_deps'] + tty.debug(' {0}/{1} -> {2}'.format( + s.name, dag_hash[:7], num_deps)) + if num_deps > 0: + # Check each of this spec's dependencies (which we have already + # processed), as they are the source of truth for their own + # full hash. If the full hash we have for any deps does not + # match what those deps have themselves, then we need to splice + # this spec with those deps, and push this spliced spec + # (spec.yaml file) back to the mirror, as well as update the + # all_mirror_specs dictionary with this spliced spec. + to_splice = [] + for dep in s.dependencies(): + dep_dag_hash = dep.dag_hash() + if dep_dag_hash in all_mirror_specs: + true_dep = all_mirror_specs[dep_dag_hash]['spec'] + if true_dep.full_hash() != dep.full_hash(): + to_splice.append(true_dep) + + if to_splice: + tty.debug(' needs the following deps spliced:') + for true_dep in to_splice: + tty.debug(' {0}/{1}'.format( + true_dep.name, true_dep.dag_hash()[:7])) + s = s.splice(true_dep, True) + + # Push this spliced spec back to the mirror + spliced_yaml = s.to_dict(hash=ht.full_hash) + for key in ['binary_cache_checksum', 'buildinfo']: + spliced_yaml[key] = spec_record[key] + + temp_yaml_path = os.path.join(tmpdir, 'spliced.spec.yaml') + with open(temp_yaml_path, 'w') as fd: + fd.write(syaml.dump(spliced_yaml)) + + spliced_yaml_url = spec_record['yaml_url'] + web_util.push_to_url( + temp_yaml_path, spliced_yaml_url, keep_original=False) + tty.debug(' spliced and wrote {0}'.format( + spliced_yaml_url)) + spec_record['spec'] = s + + db.add(s, None) + db.mark(s, 'in_buildcache', True) + + # Now that we have fixed any old spec yamls that might have had the wrong + # full hash for their dependencies, we can generate the index, compute + # the hash, and push those files to the mirror. index_json_path = os.path.join(db_root_dir, 'index.json') with open(index_json_path, 'w') as f: db._write_to_file(f) @@ -782,6 +846,7 @@ def generate_package_index(cache_prefix): msg = 'Encountered problem pushing package index to {0}: {1}'.format( cache_prefix, err) tty.warn(msg) + tty.debug('\n' + traceback.format_exc()) finally: shutil.rmtree(tmpdir) diff --git a/lib/spack/spack/test/bindist.py b/lib/spack/spack/test/bindist.py index 2e6d5994224..76d51aa3f2c 100644 --- a/lib/spack/spack/test/bindist.py +++ b/lib/spack/spack/test/bindist.py @@ -10,12 +10,15 @@ import py import pytest +import llnl.util.filesystem as fs + import spack.binary_distribution as bindist import spack.config import spack.hooks.sbang as sbang import spack.main import spack.mirror import spack.repo +import spack.spec as spec import spack.store import spack.util.gpg import spack.util.web as web_util @@ -589,3 +592,55 @@ def test_update_sbang(tmpdir, test_mirror): open(str(installed_script_style_2_path)).read() uninstall_cmd('-y', '/%s' % new_spec.dag_hash()) + + +@pytest.mark.usefixtures( + 'install_mockery_mutable_config', 'mock_packages', 'mock_fetch', +) +def test_update_index_fix_deps(monkeypatch, tmpdir, mutable_config): + """Ensure spack buildcache update-index properly fixes up spec.yaml + files on the mirror when updating the buildcache index.""" + + # Create a temp mirror directory for buildcache usage + mirror_dir = tmpdir.join('mirror_dir') + mirror_url = 'file://{0}'.format(mirror_dir.strpath) + spack.config.set('mirrors', {'test': mirror_url}) + + a = Spec('a').concretized() + b = Spec('b').concretized() + new_b_full_hash = 'abcdef' + + # Install package a with dep b + install_cmd('--no-cache', a.name) + + # Create a buildcache for a and its dep b, and update index + buildcache_cmd('create', '-uad', mirror_dir.strpath, a.name) + buildcache_cmd('update-index', '-d', mirror_dir.strpath) + + # Simulate an update to b that only affects full hash by simply overwriting + # the full hash in the spec.yaml file on the mirror + b_spec_yaml_name = bindist.tarball_name(b, '.spec.yaml') + b_spec_yaml_path = os.path.join(mirror_dir.strpath, + bindist.build_cache_relative_path(), + b_spec_yaml_name) + fs.filter_file(r"full_hash:\s[^\s]+$", + "full_hash: {0}".format(new_b_full_hash), + b_spec_yaml_path) + + # When we update the index, spack should notice that a's notion of the + # full hash of b doesn't match b's notion of it's own full hash, and as + # a result, spack should fix the spec.yaml for a + buildcache_cmd('update-index', '-d', mirror_dir.strpath) + + # Read in the concrete spec yaml of a + a_spec_yaml_name = bindist.tarball_name(a, '.spec.yaml') + a_spec_yaml_path = os.path.join(mirror_dir.strpath, + bindist.build_cache_relative_path(), + a_spec_yaml_name) + + # Turn concrete spec yaml into a concrete spec (a) + with open(a_spec_yaml_path) as fd: + a_prime = spec.Spec.from_yaml(fd.read()) + + # Make sure the full hash of b in a's spec yaml matches the new value + assert(a_prime[b.name].full_hash() == new_b_full_hash) From 112c1751d71296ff61d0a44333e2876ff077c358 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 11 Jul 2021 11:49:19 -0700 Subject: [PATCH 060/289] docs: fix reference to count of system packages (#24821) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 015e29efe105ddd039e8b395e12cf78a3787ebb3 that introduced this section to the documentation said “two” here instead of the actual count, three. 9f54cea5c500bb19d2301149460c741e96be1f8b then added a fourth, BLAS/LAPACK. Rather than trying to keep this leading count in sync, this change just replaces the wording with something more generic/stable. --- lib/spack/docs/getting_started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/docs/getting_started.rst b/lib/spack/docs/getting_started.rst index bd57e64f2bb..3d0e90d3ab7 100644 --- a/lib/spack/docs/getting_started.rst +++ b/lib/spack/docs/getting_started.rst @@ -777,7 +777,7 @@ an OpenMPI installed in /opt/local, one would use: buildable: False In general, Spack is easier to use and more reliable if it builds all of -its own dependencies. However, there are two packages for which one +its own dependencies. However, there are several packages for which one commonly needs to use system versions: ^^^ From e957c58a1e27b366d1ffad47d5da6773c7443949 Mon Sep 17 00:00:00 2001 From: Christoph Conrads Date: Sun, 11 Jul 2021 21:43:37 +0200 Subject: [PATCH 061/289] Expat: add version 2.4.0, 2.4.1; fix CVE-2013-0340 (#24669) * Expat: add version 2.4.0, 2.4.1; fix CVE-2013-0340 fixes #24628 * E4S pipeline: update pinned Expat version --- .../cloud_pipelines/stacks/e4s-on-power/spack.yaml | 2 +- .../spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 2 +- var/spack/repos/builtin/packages/expat/package.py | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml index a006afcd0b2..ee725255d6d 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml @@ -61,7 +61,7 @@ spack: variants: +bzip2 ~nls +xz expat: version: - - 2.3.0 + - 2.4.1 findutils: version: - 4.8.0 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 62dd50dccf9..4a8fedbc352 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -58,7 +58,7 @@ spack: variants: +bzip2 ~nls +xz expat: version: - - 2.3.0 + - 2.4.1 findutils: version: - 4.8.0 diff --git a/var/spack/repos/builtin/packages/expat/package.py b/var/spack/repos/builtin/packages/expat/package.py index ddc6f8bc85c..799928b11a2 100644 --- a/var/spack/repos/builtin/packages/expat/package.py +++ b/var/spack/repos/builtin/packages/expat/package.py @@ -14,9 +14,13 @@ class Expat(AutotoolsPackage): homepage = "https://libexpat.github.io/" url = "https://github.com/libexpat/libexpat/releases/download/R_2_2_9/expat-2.2.9.tar.bz2" - version('2.3.0', sha256='f122a20eada303f904d5e0513326c5b821248f2d4d2afbf5c6f1339e511c0586') - version('2.2.10', sha256='b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5') - version('2.2.9', sha256='f1063084dc4302a427dabcca499c8312b3a32a29b7d2506653ecc8f950a9a237') + version('2.4.1', sha256='2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40') + version('2.4.0', sha256='8c59142ef88913bc0a8b6e4c58970c034210ca552e6271f52f6cd6cce3708424') + # deprecate all releases before 2.4.0 because of CVE-2013-0340 + # ("billion laughs attack") + version('2.3.0', sha256='f122a20eada303f904d5e0513326c5b821248f2d4d2afbf5c6f1339e511c0586', deprecated=True) + version('2.2.10', sha256='b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5', deprecated=True) + version('2.2.9', sha256='f1063084dc4302a427dabcca499c8312b3a32a29b7d2506653ecc8f950a9a237', deprecated=True) version('2.2.6', sha256='17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2', deprecated=True) version('2.2.5', sha256='d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6', deprecated=True) version('2.2.2', sha256='4376911fcf81a23ebd821bbabc26fd933f3ac74833f74924342c29aad2c86046', deprecated=True) From 4c7aed5d57b5b19978e59610848d4739b1a0472f Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 12 Jul 2021 07:35:43 -0400 Subject: [PATCH 062/289] lorene, pgplot: new packages (#24549) --- .../packages/lorene/local_settings.template | 20 ++++ .../repos/builtin/packages/lorene/package.py | 96 +++++++++++++++++++ .../packages/pgplot/g77_gcc.conf.patch | 55 +++++++++++ .../repos/builtin/packages/pgplot/package.py | 84 ++++++++++++++++ 4 files changed, 255 insertions(+) create mode 100644 var/spack/repos/builtin/packages/lorene/local_settings.template create mode 100644 var/spack/repos/builtin/packages/lorene/package.py create mode 100644 var/spack/repos/builtin/packages/pgplot/g77_gcc.conf.patch create mode 100644 var/spack/repos/builtin/packages/pgplot/package.py diff --git a/var/spack/repos/builtin/packages/lorene/local_settings.template b/var/spack/repos/builtin/packages/lorene/local_settings.template new file mode 100644 index 00000000000..03ede31fee8 --- /dev/null +++ b/var/spack/repos/builtin/packages/lorene/local_settings.template @@ -0,0 +1,20 @@ +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +CXXFLAGS_G = @CXXFLAGS_G@ + +F77 = @F77@ +F77FLAGS = @F77FLAGS@ +F77FLAGS_G = @F77FLAGS_G@ + +INC = @INC@ +RANLIB = @RANLIB@ + +MAKEDEPEND = @MAKEDEPEND@ +DEPDIR = .deps + +FFT_DIR = @FFT_DIR@ +LIB_CXX = @LIB_CXX@ + +LIB_GSL = @LIB_GSL@ +LIB_LAPACK = @LIB_LAPACK@ +LIB_PGPLOT = @LIB_PGPLOT@ diff --git a/var/spack/repos/builtin/packages/lorene/package.py b/var/spack/repos/builtin/packages/lorene/package.py new file mode 100644 index 00000000000..daf29674182 --- /dev/null +++ b/var/spack/repos/builtin/packages/lorene/package.py @@ -0,0 +1,96 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import inspect +import os + +from spack import * + + +class Lorene(MakefilePackage): + """LORENE: Langage Objet pour la RElativite NumeriquE + + LORENE is a set of C++ classes to solve various problems + arising in numerical relativity, and more generally in + computational astrophysics. It provides tools to solve + partial differential equations by means of multi-domain + spectral methods.""" + + homepage = "https://lorene.obspm.fr/index.html" + cvs = ":pserver:anonymous:anonymous@octane.obspm.fr:/cvsroot%module=Lorene" + + maintainers = ['eschnett'] + + version('2021.4.22', date='2021-04-22') + + variant('fftw', default=True, + description='Use external FFTW for spectral transformations') + variant('bin_star', default=True, + description='Build Bin_star solver for binary neutron star systems') + + depends_on('fftw @3:', when='+fftw') + depends_on('gsl') + depends_on('lapack') + depends_on('pgplot') + + parallel = False + + def edit(self, spec, prefix): + fftw_incdirs = "-I" + spec['fftw'].prefix.include if '+fftw' in spec else "" + fftw_libdirs = "-L" + spec['fftw'].prefix.lib if '+fftw' in spec else "" + gsl_incdirs = "-I" + spec['gsl'].prefix.include + gsl_libdirs = "-L" + spec['gsl'].prefix.lib + pgplot_incdirs = "-I" + spec['pgplot'].prefix.include + pgplot_libdirs = "-L" + spec['pgplot'].prefix.lib + + substitutions = [ + ('@CXX@', self.compiler.cxx), + ('@CXXFLAGS@', "-g -I$(HOME_LORENE)/C++/Include -O3 -DNDEBUG"), + ('@CXXFLAGS_G@', "-g -I$(HOME_LORENE)/C++/Include"), + ('@F77@', self.compiler.f77), + ('@F77FLAGS@', "-ffixed-line-length-none -g -O3"), + ('@F77FLAGS_G@', "-ffixed-line-length-none -g"), + ('@INC@', + ("-I$(HOME_LORENE)/C++/Include " + + "-I$(HOME_LORENE)/C++/Include_extra " + + fftw_incdirs + " " + gsl_incdirs + " " + pgplot_incdirs)), + ('@RANLIB@', "ls"), + ('@MAKEDEPEND@', "cpp $(INC) -M >> $(df).d $<"), + ('@FFT_DIR@', "FFTW3"), + ('@LIB_CXX@', fftw_libdirs + " -lfftw3 -lgfortran"), + ('@LIB_GSL@', gsl_libdirs + " -lgsl -lgslcblas"), + ('@LIB_LAPACK@', "-llapack -lblas"), + ('@LIB_PGPLOT@', pgplot_libdirs + " -lcpgplot -lpgplot"), + ] + local_settings_template = join_path( + os.path.dirname(inspect.getmodule(self).__file__), + 'local_settings.template' + ) + local_settings = join_path( + self.stage.source_path, 'local_settings' + ) + copy(local_settings_template, local_settings) + for key, value in substitutions: + filter_file(key, value, local_settings) + + def build(self, spec, prefix): + args = ['HOME_LORENE=' + self.build_directory] + # (We could build the documentation as well.) + # (We could circumvent the build system and simply compile all + # source files, and do so in parallel.) + make('cpp', 'fortran', 'export', *args) + if '+bin_star' in spec: + with working_dir(join_path('Codes', 'Bin_star')): + make('-f', 'Makefile_O2', + 'coal', 'lit_bin', 'init_bin', 'coal_regu', 'init_bin_regu', + 'analyse', 'prepare_seq', + *args) + + def install(self, spec, prefix): + mkdirp(prefix.lib) + install_tree('Lib', prefix.lib) + mkdirp(prefix.bin) + if '+bin_star' in spec: + install_tree(join_path('Codes', 'Bin_star'), prefix.bin) diff --git a/var/spack/repos/builtin/packages/pgplot/g77_gcc.conf.patch b/var/spack/repos/builtin/packages/pgplot/g77_gcc.conf.patch new file mode 100644 index 00000000000..e41e387cad1 --- /dev/null +++ b/var/spack/repos/builtin/packages/pgplot/g77_gcc.conf.patch @@ -0,0 +1,55 @@ +diff -ruN a/sys_linux/g77_gcc.conf b/sys_linux/g77_gcc.conf +--- a/sys_linux/g77_gcc.conf 1969-12-31 19:00:00.000000000 -0500 ++++ b/sys_linux/g77_gcc.conf 2021-04-22 16:48:45.000000000 -0400 +@@ -34,13 +34,13 @@ + # Mandatory. + # The FORTRAN compiler to use. + +- FCOMPL="g77" ++ FCOMPL="@FCOMPL@" + + # Mandatory. + # The FORTRAN compiler flags to use when compiling the pgplot library. + # (NB. makemake prepends -c to $FFLAGC where needed) + +- FFLAGC="-u -Wall -fPIC -O" ++ FFLAGC="@FFLAGC@" + + # Mandatory. + # The FORTRAN compiler flags to use when compiling fortran demo programs. +@@ -52,12 +52,12 @@ + # Mandatory. + # The C compiler to use. + +- CCOMPL="gcc" ++ CCOMPL="@CCOMPL@" + + # Mandatory. + # The C compiler flags to use when compiling the pgplot library. + +- CFLAGC="-Wall -fPIC -DPG_PPU -O" ++ CFLAGC="@CFLAGC@" + + # Mandatory. + # The C compiler flags to use when compiling C demo programs. +@@ -73,9 +73,9 @@ + # Mandatory. + # The library-specification flags to use when linking normal pgplot + # demo programs. + +- LIBS="-L/usr/X11R6/lib -lX11" ++ LIBS="@LIBS@" + + # Optional: Needed by XMDRIV (/xmotif). + # The library-specification flags to use when linking motif + # demo programs. +@@ -108,8 +108,8 @@ + # Optional: Needed if SHARED_LIB is set. + # How to create a shared library from a trailing list of object files. + +- SHARED_LD="gcc -shared -o $SHARED_LIB" ++ SHARED_LD="@SHARED_LD@" + + # Optional: + # On systems such as Solaris 2.x, that allow specification of the + # libraries that a shared library needs to be linked with when a diff --git a/var/spack/repos/builtin/packages/pgplot/package.py b/var/spack/repos/builtin/packages/pgplot/package.py new file mode 100644 index 00000000000..1cad3f68c38 --- /dev/null +++ b/var/spack/repos/builtin/packages/pgplot/package.py @@ -0,0 +1,84 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Pgplot(MakefilePackage): + """PGPLOT Graphics Subroutine Library + + The PGPLOT Graphics Subroutine Library is a Fortran- or + C-callable, device-independent graphics package for making + simple scientific graphs. It is intended for making + graphical images of publication quality with minimum effort + on the part of the user. For most applications, the program + can be device-independent, and the output can be directed to + the appropriate device at run time.""" + + homepage = "https://sites.astro.caltech.edu/~tjp/pgplot/" + url = "ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz" + + maintainers = ['eschnett'] + + version('5.2.2', + url="ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz", + sha256='a5799ff719a510d84d26df4ae7409ae61fe66477e3f1e8820422a9a4727a5be4') + + # Replace hard-coded compilers and options by tokens, so that Spack can + # edit the file more easily + patch('g77_gcc.conf.patch') + + parallel = False + + def edit(self, spec, prefix): + substitutions = [ + ('@CCOMPL@', self.compiler.cc), + ('@CFLAGC@', ("-Wall -fPIC -DPG_PPU -O -std=c89 " + + "-Wno-error=implicit-function-declaration")), + ('@FCOMPL@', self.compiler.f77), + ('@FFLAGC@', "-Wall -fPIC -O -ffixed-line-length-none -fallow-invalid-boz"), + ('@LIBS@', "-lgfortran"), + ('@SHARED_LD@', self.compiler.cc + " -shared -o $SHARED_LIB -lgfortran"), + ] + conf = join_path( + self.stage.source_path, 'sys_linux/g77_gcc.conf' + ) + for key, value in substitutions: + filter_file(key, value, conf) + + def build(self, spec, prefix): + makemake = which('./makemake') + makemake(self.build_directory, 'linux', 'g77_gcc') + make() + make('clean') + make('cpg') + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('cpgdemo', prefix.bin) + install('pgbind', prefix.bin) + install('pgdemo1', prefix.bin) + install('pgdemo2', prefix.bin) + install('pgdemo3', prefix.bin) + install('pgdemo4', prefix.bin) + install('pgdemo5', prefix.bin) + install('pgdemo6', prefix.bin) + install('pgdemo7', prefix.bin) + install('pgdemo8', prefix.bin) + install('pgdemo9', prefix.bin) + install('pgdemo10', prefix.bin) + install('pgdemo11', prefix.bin) + install('pgdemo12', prefix.bin) + install('pgdemo13', prefix.bin) + install('pgdemo14', prefix.bin) + install('pgdemo15', prefix.bin) + install('pgdemo16', prefix.bin) + install('pgdemo17', prefix.bin) + mkdirp(prefix.include) + install('cpgplot.h', prefix.include) + mkdirp(prefix.lib) + install('libcpgplot.a', prefix.lib) + install('libpgplot.a', prefix.lib) + install('libpgplot.so', prefix.lib) From 872785db166513e8a3c23a11722da55e482a5586 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 12 Jul 2021 06:40:32 -0500 Subject: [PATCH 063/289] py-sphobjinv: add new package (#24790) --- .../builtin/packages/py-sphobjinv/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-sphobjinv/package.py diff --git a/var/spack/repos/builtin/packages/py-sphobjinv/package.py b/var/spack/repos/builtin/packages/py-sphobjinv/package.py new file mode 100644 index 00000000000..d70185b7ff5 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-sphobjinv/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PySphobjinv(PythonPackage): + """Sphinx objects.inv Inspection/Manipulation Tool.""" + + homepage = "https://github.com/bskinn/sphobjinv" + url = "https://github.com/bskinn/sphobjinv/archive/refs/tags/v2.1.tar.gz" + + version('2.1', sha256='e41950a578dfd5acae24f12c7fe12b8d5e44f9162487aaa27189ca2e5c45d30c') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools', type=('build', 'run')) + depends_on('py-attrs@19.2:', type=('build', 'run')) + depends_on('py-certifi', type=('build', 'run')) + depends_on('py-fuzzywuzzy@0.8:', type=('build', 'run')) + depends_on('py-jsonschema@3.0:', type=('build', 'run')) From 1784b05eaf5269699671efb88b38068e22734c02 Mon Sep 17 00:00:00 2001 From: Sebastian Schmitt Date: Mon, 12 Jul 2021 17:01:13 +0200 Subject: [PATCH 064/289] Update multiprocess (#24634) * Update multiprocess * Add build and run --- var/spack/repos/builtin/packages/py-multiprocess/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-multiprocess/package.py b/var/spack/repos/builtin/packages/py-multiprocess/package.py index c4ff2c84878..6e92fe6db9b 100644 --- a/var/spack/repos/builtin/packages/py-multiprocess/package.py +++ b/var/spack/repos/builtin/packages/py-multiprocess/package.py @@ -12,21 +12,24 @@ class PyMultiprocess(PythonPackage): homepage = "https://github.com/uqfoundation/multiprocess" pypi = "multiprocess/multiprocess-0.70.5.zip" + version('0.70.12.2', sha256='206bb9b97b73f87fec1ed15a19f8762950256aa84225450abc7150d02855a083') version('0.70.9', sha256='9fd5bd990132da77e73dec6e9613408602a4612e1d73caf2e2b813d2b61508e5') version('0.70.7', sha256='3394f1fbd0d87112690a877e49eb7917d851ee8d822294d522dd4deae12febdb') version('0.70.5', sha256='c4c196f3c4561dc1d78139c3e73709906a222d2fc166ef3eef895d8623df7267') version('0.70.4', sha256='a692c6dc8392c25b29391abb58a9fbdc1ac38bca73c6f27d787774201e68e12c') depends_on('python@2.5:2.8,3.1:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.6:', when='@0.70.12.2:', type=('build', 'run')) depends_on('py-setuptools@0.6:', type='build') depends_on('py-dill@0.2.6:', type=('build', 'run')) depends_on('py-dill@0.2.9:', type=('build', 'run'), when='@0.70.7:') depends_on('py-dill@0.3.1:', type=('build', 'run'), when='@0.70.9:') + depends_on('py-dill@0.3.4:', type=('build', 'run'), when='@0.70.12.2:') def url_for_version(self, version): url = self.url.rsplit('/', 1)[0] - if version >= Version('0.70.7'): + if Version('0.70.12.2') > version >= Version('0.70.7'): url += '/multiprocess-{0}.tar.gz' else: url += '/multiprocess-{0}.zip' From 6d22e9cd7b427f2d3d24bf1246215e0b9ba248e2 Mon Sep 17 00:00:00 2001 From: Sebastian Schmitt Date: Mon, 12 Jul 2021 17:01:43 +0200 Subject: [PATCH 065/289] Update pathos (#24636) * Update pathos * Add build and run --- var/spack/repos/builtin/packages/py-pathos/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pathos/package.py b/var/spack/repos/builtin/packages/py-pathos/package.py index d79aeb9c722..da3de4f513f 100644 --- a/var/spack/repos/builtin/packages/py-pathos/package.py +++ b/var/spack/repos/builtin/packages/py-pathos/package.py @@ -12,20 +12,26 @@ class PyPathos(PythonPackage): homepage = "https://github.com/uqfoundation/pathos" pypi = "pathos/pathos-0.2.3.tar.gz" + version('0.2.8', sha256='1f0f27a90f7ab66c423ba796529000fde9360d17b2d8e50097641ff405fc6f15') version('0.2.3', sha256='954c5b0a8b257c375e35d311c65fa62a210a3d65269195557de38418ac9f61f9') version('0.2.0', sha256='2f4e67e7914c95fb0cce766bab173eb2c5860ee420108fa183099557ac2e50e9') - depends_on('python@2.6:2.8,3.1:') + depends_on('python@2.6:2.8,3.1:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.6:', when='@0.2.8:', type=('build', 'run')) depends_on('py-setuptools@0.6:', type='build') depends_on('py-multiprocess@0.70.7:', type=('build', 'run')) depends_on('py-pox@0.2.5:', type=('build', 'run')) + depends_on('py-pox@0.3.0:', type=('build', 'run'), when='@0.2.8:') depends_on('py-ppft@1.6.4.9:', type=('build', 'run')) + depends_on('py-ppft@1.6.6.4:', type=('build', 'run'), when='@0.2.8:') depends_on('py-dill@0.2.9:', type=('build', 'run')) + depends_on('py-dill@0.3.4:', type=('build', 'run'), when='@0.2.8:') + depends_on('py-multiprocess@0.70.12:', type=('build', 'run'), when='@0.2.8:') def url_for_version(self, version): url = self.url.rsplit('/', 1)[0] - if version >= Version('0.2.2'): + if Version('0.2.8') > version >= Version('0.2.2'): url += '/pathos-{0}.tar.gz' else: url += '/pathos-{0}.zip' From 9d6d2f0f9b71e6436e01a70830d7e42616859d75 Mon Sep 17 00:00:00 2001 From: Ryan O'Malley Date: Mon, 12 Jul 2021 16:13:31 -0500 Subject: [PATCH 066/289] folly: added latest version and switched to CMakePackage (#23938) * added latest version and switched to CMakePackage * Added optional dependencies and cxxstd variant * Added cxxstd variant and optional dependencies * Added lib. that Boost doesn't install by default * BUG: Removed previous broken versions of Folly * BUG: refactored comments * BUG: Fixed styling errors --- .../repos/builtin/packages/folly/package.py | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/folly/package.py b/var/spack/repos/builtin/packages/folly/package.py index 86e8d54332b..c76a5f3901a 100644 --- a/var/spack/repos/builtin/packages/folly/package.py +++ b/var/spack/repos/builtin/packages/folly/package.py @@ -7,7 +7,7 @@ from spack import * -class Folly(AutotoolsPackage): +class Folly(CMakePackage): """Folly (acronymed loosely after Facebook Open Source Library) is a library of C++11 components designed with practicality and efficiency in mind. @@ -18,29 +18,31 @@ class Folly(AutotoolsPackage): """ homepage = "https://github.com/facebook/folly" - url = "https://github.com/facebook/folly/archive/v2017.06.05.00.tar.gz" + url = "https://github.com/facebook/folly/releases/download/v2021.05.24.00/folly-v2021.05.24.00.tar.gz" + version('2021.05.24.00', sha256='9d308adefe4670637f5c7d96309b3b394ac3fa129bc954f5dfbdd8b741c02aad') - version('2017.06.05.00', sha256='d22ceda4dfe33583828be1193fa3929d70c51998f0797236e293c44ef828c6d0') - version('2016.11.14.00', sha256='cde5b3e1a38d181f7c4e52d590de1c1aca58da7b27b3020d08e9aa45b4c3ed74') - version('2016.11.07.00', sha256='4400d7f0fead90d88ce4caee9f0e9aeb8008c9954ea9034e19ae7226175206ba') - version('2016.10.31.00', sha256='7bef9ee956248f68f1c4e96be67561842ee6cc030a58e132b93b9be57b6b29ea') - version('2016.10.24.00', sha256='d54b609d3750a6a1cfbda7c62e1457af60cf5efc48d7a8e6552d67909e064757') - version('2016.10.17.00', sha256='0f83685016d020111ba54ddc48c0cf33e1e0b9b35cee5ae82d5f2cbc5f6b0e82') - - depends_on('m4', type='build') - depends_on('autoconf', type='build') - depends_on('automake', type='build') - depends_on('libtool', type='build') + # CMakePackage Dependency depends_on('pkgconfig', type='build') - # TODO: folly requires gcc 4.9+ and a version of boost compiled with - # TODO: C++14 support (but there's no neat way to check that these - # TODO: constraints are met right now) - depends_on('boost') + # folly requires gcc 4.9+ and a version of boost compiled with >= C++14 + # TODO: Specify the boost components + variant('cxxstd', default='14', values=('14', '17'), multi=False, description='Use the specified C++ standard when building.') + depends_on('boost+context+container cxxstd=14', when='cxxstd=14') + depends_on('boost+context+container cxxstd=17', when='cxxstd=17') + # required dependencies depends_on('gflags') depends_on('glog') depends_on('double-conversion') depends_on('libevent') + depends_on('fmt') + + # optional dependencies + variant('libdwarf', default=False, description="Optional Dependency") + variant('elfutils', default=False, description="Optional Dependency") + variant('libunwind', default=False, description="Optional Dependency") + depends_on('libdwarf', when='+libdwarf') + depends_on('elfutils', when='+elfutils') + depends_on('libunwind', when='+libunwind') configure_directory = 'folly' From 34b763f792aa3fecd321a62eb103a803d954718a Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Mon, 12 Jul 2021 23:48:09 +0200 Subject: [PATCH 067/289] hepmc3: add version 3.2.4 (#24839) * hepmc3: add version 3.2.4 * hepmc3: clean up legacy arguments from hepmc2 and fix tests --- var/spack/repos/builtin/packages/hepmc3/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/hepmc3/package.py b/var/spack/repos/builtin/packages/hepmc3/package.py index 54996b5ca38..34cfc7be330 100644 --- a/var/spack/repos/builtin/packages/hepmc3/package.py +++ b/var/spack/repos/builtin/packages/hepmc3/package.py @@ -18,6 +18,7 @@ class Hepmc3(CMakePackage): maintainers = ['vvolkl'] + version('3.2.4', sha256='e088fccfd1a6c2f8e1089f457101bee1e5c7a9777e9d51c6419c8a288a49e1bb') version('3.2.3', sha256='8caadacc2c969883cd1f994b622795fc885fb4b15dad8c8ae64bcbdbf0cbd47d') version('3.2.2', sha256='0e8cb4f78f804e38f7d29875db66f65e4c77896749d723548cc70fb7965e2d41') version('3.2.1', sha256='6e4e4bb5708af105d4bf74efc2745e6efe704e942d46a8042f7dcae37a4739fe') @@ -42,8 +43,6 @@ class Hepmc3(CMakePackage): def cmake_args(self): spec = self.spec args = [ - '-Dmomentum:STRING=GEV', - '-Dlength:STRING=MM', '-DHEPMC3_ENABLE_PYTHON={0}'.format(spec.satisfies('+python')), '-DHEPMC3_ENABLE_ROOTIO={0}'.format(spec.satisfies('+rootio')), '-DHEPMC3_INSTALL_INTERFACES={0}'.format( @@ -61,4 +60,5 @@ def cmake_args(self): if self.spec.satisfies('+rootio'): args.append('-DROOT_DIR={0}'.format(self.spec['root'].prefix)) + args.append("-DHEPMC3_ENABLE_TEST={0}".format(self.run_tests)) return args From f58b2e03ca5611a92f559f4b81eeae883c7b274a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Mon, 12 Jul 2021 14:48:52 -0700 Subject: [PATCH 068/289] build output: filter padding out of console output when `padded_length` is used (#24514) Spack allows users to set `padded_length` to pad out the installation path in build farms so that any binaries created are more easily relocatable. The issue with this is that the padding dominates installation output and makes it difficult to see what is going on. The padding also causes logs to easily exceed size limits for things like GitLab artifacts. This PR fixes this by adding a filter in the logger daemon. If you use a setting like this: config: install_tree: padded_length: 512 Then lines like this in the output: ==> [2021-06-23-15:59:05.020387] './configure' '--prefix=/Users/gamblin2/padding-log-test/opt/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_pla/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga will be replaced with the much more readable: ==> [2021-06-23-15:59:05.020387] './configure' '--prefix=/Users/gamblin2/padding-log-test/opt/[padded-to-512-chars]/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga You can see that the padding has been replaced with `[padded-to-512-chars]` to indicate the total number of characters in the padded prefix. Over a long log file, this should save a lot of space and allow us to see error messages in GitHub/GitLab log output. The *actual* build logs still have full paths in them. Also lines that are output by Spack and not by a package build are not filtered and will still display the fully padded path. There aren't that many of these, so the change should still help reduce file size and readability quite a bit. --- lib/spack/llnl/util/tty/log.py | 15 +++-- lib/spack/spack/installer.py | 12 +++- lib/spack/spack/test/llnl/util/tty/log.py | 33 ++++++++++ lib/spack/spack/test/util/path.py | 59 ++++++++++++++++++ lib/spack/spack/util/path.py | 76 ++++++++++++++++++++++- 5 files changed, 188 insertions(+), 7 deletions(-) create mode 100644 lib/spack/spack/test/util/path.py diff --git a/lib/spack/llnl/util/tty/log.py b/lib/spack/llnl/util/tty/log.py index 947e79b8c98..f081893c85e 100644 --- a/lib/spack/llnl/util/tty/log.py +++ b/lib/spack/llnl/util/tty/log.py @@ -436,7 +436,7 @@ class log_output(object): """ def __init__(self, file_like=None, echo=False, debug=0, buffer=False, - env=None): + env=None, filter_fn=None): """Create a new output log context manager. Args: @@ -446,6 +446,8 @@ def __init__(self, file_like=None, echo=False, debug=0, buffer=False, debug (int): positive to enable tty debug mode during logging buffer (bool): pass buffer=True to skip unbuffering output; note this doesn't set up any *new* buffering + filter_fn (callable, optional): Callable[str] -> str to filter each + line of output log_output can take either a file object or a filename. If a filename is passed, the file will be opened and closed entirely @@ -465,6 +467,7 @@ def __init__(self, file_like=None, echo=False, debug=0, buffer=False, self.debug = debug self.buffer = buffer self.env = env # the environment to use for _writer_daemon + self.filter_fn = filter_fn self._active = False # used to prevent re-entry @@ -543,7 +546,7 @@ def __enter__(self): target=_writer_daemon, args=( input_multiprocess_fd, read_multiprocess_fd, write_fd, - self.echo, self.log_file, child_pipe + self.echo, self.log_file, child_pipe, self.filter_fn ) ) self.process.daemon = True # must set before start() @@ -667,7 +670,7 @@ def force_echo(self): def _writer_daemon(stdin_multiprocess_fd, read_multiprocess_fd, write_fd, echo, - log_file_wrapper, control_pipe): + log_file_wrapper, control_pipe, filter_fn): """Daemon used by ``log_output`` to write to a log file and to ``stdout``. The daemon receives output from the parent process and writes it both @@ -712,6 +715,7 @@ def _writer_daemon(stdin_multiprocess_fd, read_multiprocess_fd, write_fd, echo, log_file_wrapper (FileWrapper): file to log all output control_pipe (Pipe): multiprocessing pipe on which to send control information to the parent + filter_fn (callable, optional): function to filter each line of output """ # If this process was forked, then it will inherit file descriptors from @@ -784,7 +788,10 @@ def _writer_daemon(stdin_multiprocess_fd, read_multiprocess_fd, write_fd, echo, # Echo to stdout if requested or forced. if echo or force_echo: - sys.stdout.write(clean_line) + output_line = clean_line + if filter_fn: + output_line = filter_fn(clean_line) + sys.stdout.write(output_line) # Stripped output to log file. log_file.write(_strip(clean_line)) diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index c6eebf30410..0cbb71ef4b6 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -1692,6 +1692,12 @@ def build_process(pkg, kwargs): verbose = kwargs.get('verbose', False) timer = Timer() + + # If we are using a padded path, filter the output to compress padded paths + # The real log still has full-length paths. + filter_padding = spack.config.get("config:install_tree:padded_length", None) + filter_fn = spack.util.path.padding_filter if filter_padding else None + if not fake: if not skip_patch: pkg.do_patch() @@ -1764,8 +1770,10 @@ def build_process(pkg, kwargs): try: # DEBUGGING TIP - to debug this section, insert an IPython # embed here, and run the sections below without log capture - with log_output(log_file, echo, True, - env=unmodified_env) as logger: + with log_output( + log_file, echo, True, env=unmodified_env, + filter_fn=filter_fn + ) as logger: with logger.force_echo(): inner_debug_level = tty.debug_level() diff --git a/lib/spack/spack/test/llnl/util/tty/log.py b/lib/spack/spack/test/llnl/util/tty/log.py index 279985001dc..a65073e6571 100644 --- a/lib/spack/spack/test/llnl/util/tty/log.py +++ b/lib/spack/spack/test/llnl/util/tty/log.py @@ -78,6 +78,39 @@ def test_log_python_output_and_echo_output(capfd, tmpdir): assert capfd.readouterr()[0] == 'force echo\n' +def _log_filter_fn(string): + return string.replace("foo", "bar") + + +def test_log_output_with_filter(capfd, tmpdir): + with tmpdir.as_cwd(): + with log_output('foo.txt', filter_fn=_log_filter_fn): + print('foo blah') + print('blah foo') + print('foo foo') + + # foo.txt output is not filtered + with open('foo.txt') as f: + assert f.read() == 'foo blah\nblah foo\nfoo foo\n' + + # output is not echoed + assert capfd.readouterr()[0] == '' + + # now try with echo + with tmpdir.as_cwd(): + with log_output('foo.txt', echo=True, filter_fn=_log_filter_fn): + print('foo blah') + print('blah foo') + print('foo foo') + + # foo.txt output is still not filtered + with open('foo.txt') as f: + assert f.read() == 'foo blah\nblah foo\nfoo foo\n' + + # echoed output is filtered. + assert capfd.readouterr()[0] == 'bar blah\nblah bar\nbar bar\n' + + @pytest.mark.skipif(not which('echo'), reason="needs echo command") def test_log_subproc_and_echo_output_no_capfd(capfd, tmpdir): echo = which('echo') diff --git a/lib/spack/spack/test/util/path.py b/lib/spack/spack/test/util/path.py new file mode 100644 index 00000000000..532bf031782 --- /dev/null +++ b/lib/spack/spack/test/util/path.py @@ -0,0 +1,59 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import pytest + +import spack.util.path as sup + +#: Some lines with lots of placeholders +padded_lines = [ + "==> [2021-06-23-15:59:05.020387] './configure' '--prefix=/Users/gamblin2/padding-log-test/opt/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_pla/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga", # noqa: E501 + "/Users/gamblin2/Workspace/spack/lib/spack/env/clang/clang -dynamiclib -install_name /Users/gamblin2/padding-log-test/opt/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_pla/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga/lib/libz.1.dylib -compatibility_version 1 -current_version 1.2.11 -fPIC -O2 -fPIC -DHAVE_HIDDEN -o libz.1.2.11.dylib adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -lc", # noqa: E501 + "rm -f /Users/gamblin2/padding-log-test/opt/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_pla/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga/lib/libz.a", # noqa: E501 +] + + +#: unpadded versions of padded_lines, with [padded-to-X-chars] replacing the padding +fixed_lines = [ + "==> [2021-06-23-15:59:05.020387] './configure' '--prefix=/Users/gamblin2/padding-log-test/opt/[padded-to-512-chars]/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga", # noqa: E501 + "/Users/gamblin2/Workspace/spack/lib/spack/env/clang/clang -dynamiclib -install_name /Users/gamblin2/padding-log-test/opt/[padded-to-512-chars]/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga/lib/libz.1.dylib -compatibility_version 1 -current_version 1.2.11 -fPIC -O2 -fPIC -DHAVE_HIDDEN -o libz.1.2.11.dylib adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -lc", # noqa: E501 + "rm -f /Users/gamblin2/padding-log-test/opt/[padded-to-512-chars]/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga/lib/libz.a", # noqa: E501 +] + + +@pytest.mark.parametrize("padded,fixed", zip(padded_lines, fixed_lines)) +def test_padding_substitution(padded, fixed): + """Ensure that all padded lines are unpadded correctly.""" + assert fixed == sup.padding_filter(padded) + + +def test_no_substitution(): + """Ensure that a line not containing one full path placeholder is not modified.""" + partial = "--prefix=/Users/gamblin2/padding-log-test/opt/__spack_path_pla/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga'" # noqa: E501 + assert sup.padding_filter(partial) == partial + + +def test_short_substitution(): + """Ensure that a single placeholder path component is replaced""" + short = "--prefix=/Users/gamblin2/padding-log-test/opt/__spack_path_placeholder__/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga'" # noqa: E501 + short_subst = "--prefix=/Users/gamblin2/padding-log-test/opt/[padded-to-63-chars]/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga'" # noqa: E501 + assert short_subst == sup.padding_filter(short) + + +def test_partial_substitution(): + """Ensure that a single placeholder path component is replaced""" + short = "--prefix=/Users/gamblin2/padding-log-test/opt/__spack_path_placeholder__/__spack_p/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga'" # noqa: E501 + short_subst = "--prefix=/Users/gamblin2/padding-log-test/opt/[padded-to-73-chars]/darwin-bigsur-skylake/apple-clang-12.0.5/zlib-1.2.11-74mwnxgn6nujehpyyalhwizwojwn5zga'" # noqa: E501 + assert short_subst == sup.padding_filter(short) + + +def test_longest_prefix_re(): + """Test that longest_prefix_re generates correct regular expressions.""" + assert "(s(?:t(?:r(?:i(?:ng?)?)?)?)?)" == sup.longest_prefix_re( + "string", capture=True + ) + assert "(?:s(?:t(?:r(?:i(?:ng?)?)?)?)?)" == sup.longest_prefix_re( + "string", capture=False + ) diff --git a/lib/spack/spack/util/path.py b/lib/spack/spack/util/path.py index b13814f4e3f..1848af1440a 100644 --- a/lib/spack/spack/util/path.py +++ b/lib/spack/spack/util/path.py @@ -44,7 +44,11 @@ # --------------------- # total -> 300 SPACK_MAX_INSTALL_PATH_LENGTH = 300 -SPACK_PATH_PADDING_CHARS = 'spack_path_placeholder' + +#: Padded paths comprise directories with this name (or some prefix of it). : +#: It starts with two underscores to make it unlikely that prefix matches would +#: include some other component of the intallation path. +SPACK_PATH_PADDING_CHARS = '__spack_path_placeholder__' @memoized @@ -158,3 +162,73 @@ def canonicalize_path(path): tty.debug("Using current working directory as base for abspath") return os.path.normpath(path) + + +def longest_prefix_re(string, capture=True): + """Return a regular expression that matches a the longest possible prefix of string. + + i.e., if the input string is ``the_quick_brown_fox``, then:: + + m = re.compile(longest_prefix('the_quick_brown_fox')) + m.match('the_').group(1) == 'the_' + m.match('the_quick').group(1) == 'the_quick' + m.match('the_quick_brown_fox').group(1) == 'the_quick_brown_fox' + m.match('the_xquick_brown_fox').group(1) == 'the_' + m.match('the_quickx_brown_fox').group(1) == 'the_quick' + + """ + if len(string) < 2: + return string + + return "(%s%s%s?)" % ( + "" if capture else "?:", + string[0], + longest_prefix_re(string[1:], capture=False) + ) + + +#: regex cache for padding_filter function +_filter_re = None + + +def padding_filter(string): + """Filter used to reduce output from path padding in log output. + + This turns paths like this: + + /foo/bar/__spack_path_placeholder__/__spack_path_placeholder__/... + + Into paths like this: + + /foo/bar/[padded-to-512-chars]/... + + Where ``padded-to-512-chars`` indicates that the prefix was padded with + placeholders until it hit 512 characters. The actual value of this number + depends on what the `install_tree``'s ``padded_length`` is configured to. + + For a path to match and be filtered, the placeholder must appear in its + entirety at least one time. e.g., "/spack/" would not be filtered, but + "/__spack_path_placeholder__/spack/" would be. + + """ + global _filter_re + + pad = spack.util.path.SPACK_PATH_PADDING_CHARS + if not _filter_re: + longest_prefix = longest_prefix_re(pad) + regex = ( + r"((?:/[^/\s]*)*?)" # zero or more leading non-whitespace path components + r"(/{pad})+" # the padding string repeated one or more times + r"(/{longest_prefix})?(?=/)" # trailing prefix of padding as path component + ) + regex = regex.replace("/", os.sep) + regex = regex.format(pad=pad, longest_prefix=longest_prefix) + _filter_re = re.compile(regex) + + def replacer(match): + return "%s%s[padded-to-%d-chars]" % ( + match.group(1), + os.sep, + len(match.group(0)) + ) + return _filter_re.sub(replacer, string) From 81bad21d3a8d7eadb3afb6953698a564cbec8efd Mon Sep 17 00:00:00 2001 From: jkelling Date: Tue, 13 Jul 2021 00:31:38 +0200 Subject: [PATCH 069/289] Update caffe package for cuda9 (#24831) Add base CudaPackage, cuda_arch --- var/spack/repos/builtin/packages/caffe/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/caffe/package.py b/var/spack/repos/builtin/packages/caffe/package.py index 1dab412e956..b2f54a3d2d9 100644 --- a/var/spack/repos/builtin/packages/caffe/package.py +++ b/var/spack/repos/builtin/packages/caffe/package.py @@ -6,7 +6,7 @@ from spack import * -class Caffe(CMakePackage): +class Caffe(CMakePackage, CudaPackage): """Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by the Berkeley Vision and Learning Center (BVLC) and by community contributors.""" @@ -43,7 +43,7 @@ class Caffe(CMakePackage): depends_on('hdf5 +hl +cxx') # Optional dependencies - depends_on('opencv@3.2.0+core+highgui+imgproc', when='+opencv') + depends_on('opencv@3.2.0:3.4.12+core+highgui+imgproc+imgcodecs', when='+opencv') depends_on('leveldb', when='+leveldb') depends_on('lmdb', when='+lmdb') depends_on('python@2.7:', when='+python') @@ -87,4 +87,10 @@ def cmake_args(self): '-DCMAKE_CXX_COMPILER={0}'.format(self.spec['mpi'].mpicxx) ]) + if '+cuda' in spec: + if spec.variants['cuda_arch'].value[0] != 'none': + cuda_arch = spec.variants['cuda_arch'].value + args.append(self.define('CUDA_ARCH_NAME', 'Manual')) + args.append(self.define('CUDA_ARCH_BIN', ' '.join(cuda_arch))) + return args From e05be70bcbb019794f1af665ae7407ee33e4de22 Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Tue, 13 Jul 2021 00:37:37 +0200 Subject: [PATCH 070/289] py-hepunits: add version 2.1.1 (#24837) --- var/spack/repos/builtin/packages/py-hepunits/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-hepunits/package.py b/var/spack/repos/builtin/packages/py-hepunits/package.py index 5b364756fbe..b11427a94fd 100644 --- a/var/spack/repos/builtin/packages/py-hepunits/package.py +++ b/var/spack/repos/builtin/packages/py-hepunits/package.py @@ -18,6 +18,7 @@ class PyHepunits(PythonPackage): maintainers = ['vvolkl'] version('master', branch='master') + version('2.1.1', sha256='21b18bbf82ade5e429e2c71ec41bc5ae8005b275466bdaef0159ddc4f8085b31') version('2.1.0', sha256='9e8da814c242579ad1fde6ccff0514195c70ab6d232eab8ff0ad675239686ef6') version('1.2.1', sha256='b05b0dda32bf797806d506d7508d4eb23b78f34d67bbba9348a2b4a9712666fa') From 9fb1c3e1430c5225403a36577a41cb7e168c49ef Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Tue, 13 Jul 2021 00:39:22 +0200 Subject: [PATCH 071/289] py-uproot: add version 4.0.11 (#24835) --- var/spack/repos/builtin/packages/py-uproot/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-uproot/package.py b/var/spack/repos/builtin/packages/py-uproot/package.py index 4cf493f500b..2d911e9d05e 100644 --- a/var/spack/repos/builtin/packages/py-uproot/package.py +++ b/var/spack/repos/builtin/packages/py-uproot/package.py @@ -23,8 +23,12 @@ class PyUproot(PythonPackage): tags = ['hep'] - version('4.0.7', sha256='7adb688601fda1e9ab8eeb9a9de681f645827dac0943c6180cf85f03f73fb789') - version('4.0.6', sha256='1bea2ccc899c6959fb2af69d7e5d1e2df210caab30d3510e26f3fc07c143c37e') + version('4.0.11', sha256='5c8f62c7eeaa50e1315e05469580130d0bcc50a6cb4456825777f73cfaf5938a') + version('4.0.10', sha256='b7f9786d87227fcdc6b84305a6219cd615844f934e3b7c2509e2d4ed095950ab') + version('4.0.9', sha256='345c20dd4e1921e3493200bf9ed4079909fb1277d02faf3136e19f4b90f8aa86') + version('4.0.8', sha256='98282142725d678815ec6f8c76f42cfb3539c9c3d5b5561b8ef2129ac5a86bcd') + version('4.0.7', sha256='7adb688601fda1e9ab8eeb9a9de681f645827dac0943c6180cf85f03f73fb789') + version('4.0.6', sha256='1bea2ccc899c6959fb2af69d7e5d1e2df210caab30d3510e26f3fc07c143c37e') variant('xrootd', default=True, description='Build with xrootd support ') From 3228c35df69519632699004dc1e0cafd37d216ac Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 13 Jul 2021 01:00:37 +0200 Subject: [PATCH 072/289] Enable/disable bootstrapping and customize store location (#23677) * Permit to enable/disable bootstrapping and customize store location This PR adds configuration handles to allow enabling and disabling bootstrapping, and to customize the store location. * Move bootstrap related configuration into its own YAML file * Add a bootstrap command to manage configuration --- etc/spack/defaults/bootstrap.yaml | 7 ++ lib/spack/spack/bootstrap.py | 21 ++++- lib/spack/spack/cmd/bootstrap.py | 110 ++++++++++++++++++++++++++ lib/spack/spack/cmd/clean.py | 5 +- lib/spack/spack/cmd/find.py | 6 +- lib/spack/spack/config.py | 2 + lib/spack/spack/paths.py | 5 +- lib/spack/spack/schema/bootstrap.py | 26 ++++++ lib/spack/spack/schema/merged.py | 2 + lib/spack/spack/store.py | 4 +- lib/spack/spack/test/bootstrap.py | 27 ++++++- lib/spack/spack/test/cmd/bootstrap.py | 101 +++++++++++++++++++++++ share/spack/spack-completion.bash | 32 +++++++- 13 files changed, 337 insertions(+), 11 deletions(-) create mode 100644 etc/spack/defaults/bootstrap.yaml create mode 100644 lib/spack/spack/cmd/bootstrap.py create mode 100644 lib/spack/spack/schema/bootstrap.py create mode 100644 lib/spack/spack/test/cmd/bootstrap.py diff --git a/etc/spack/defaults/bootstrap.yaml b/etc/spack/defaults/bootstrap.yaml new file mode 100644 index 00000000000..78bb43f4b17 --- /dev/null +++ b/etc/spack/defaults/bootstrap.yaml @@ -0,0 +1,7 @@ +bootstrap: + # If set to false Spack will not bootstrap missing software, + # but will instead raise an error. + enable: true + # Root directory for bootstrapping work. The software bootstrapped + # by Spack is installed in a "store" subfolder of this root directory + root: ~/.spack/bootstrap diff --git a/lib/spack/spack/bootstrap.py b/lib/spack/spack/bootstrap.py index 86c3110983b..96f11b631d1 100644 --- a/lib/spack/spack/bootstrap.py +++ b/lib/spack/spack/bootstrap.py @@ -25,6 +25,7 @@ import spack.store import spack.user_environment as uenv import spack.util.executable +import spack.util.path from spack.util.environment import EnvironmentModifications @@ -216,9 +217,10 @@ def _bootstrap_config_scopes(): @contextlib.contextmanager def ensure_bootstrap_configuration(): + bootstrap_store_path = store_path() with spack.architecture.use_platform(spack.architecture.real_platform()): with spack.repo.use_repositories(spack.paths.packages_path): - with spack.store.use_store(spack.paths.user_bootstrap_store): + with spack.store.use_store(bootstrap_store_path): # Default configuration scopes excluding command line # and builtin but accounting for platform specific scopes config_scopes = _bootstrap_config_scopes() @@ -227,6 +229,23 @@ def ensure_bootstrap_configuration(): yield +def store_path(): + """Path to the store used for bootstrapped software""" + enabled = spack.config.get('bootstrap:enable', True) + if not enabled: + msg = ('bootstrapping is currently disabled. ' + 'Use "spack bootstrap enable" to enable it') + raise RuntimeError(msg) + + bootstrap_root_path = spack.config.get( + 'bootstrap:root', spack.paths.user_bootstrap_path + ) + bootstrap_store_path = spack.util.path.canonicalize_path( + os.path.join(bootstrap_root_path, 'store') + ) + return bootstrap_store_path + + def clingo_root_spec(): # Construct the root spec that will be used to bootstrap clingo spec_str = 'clingo-bootstrap@spack+python' diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py new file mode 100644 index 00000000000..2c95da117cb --- /dev/null +++ b/lib/spack/spack/cmd/bootstrap.py @@ -0,0 +1,110 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os.path +import shutil + +import llnl.util.tty + +import spack.cmd.common.arguments +import spack.config +import spack.main +import spack.util.path + +description = "manage bootstrap configuration" +section = "system" +level = "long" + + +def _add_scope_option(parser): + scopes = spack.config.scopes() + scopes_metavar = spack.config.scopes_metavar + parser.add_argument( + '--scope', choices=scopes, metavar=scopes_metavar, + help="configuration scope to read/modify" + ) + + +def setup_parser(subparser): + sp = subparser.add_subparsers(dest='subcommand') + + enable = sp.add_parser('enable', help='enable bootstrapping') + _add_scope_option(enable) + + disable = sp.add_parser('disable', help='disable bootstrapping') + _add_scope_option(disable) + + reset = sp.add_parser( + 'reset', help='reset bootstrapping configuration to Spack defaults' + ) + spack.cmd.common.arguments.add_common_arguments( + reset, ['yes_to_all'] + ) + + root = sp.add_parser( + 'root', help='get/set the root bootstrap directory' + ) + _add_scope_option(root) + root.add_argument( + 'path', nargs='?', default=None, + help='set the bootstrap directory to this value' + ) + + +def _enable_or_disable(args): + # Set to True if we called "enable", otherwise set to false + value = args.subcommand == 'enable' + spack.config.set('bootstrap:enable', value, scope=args.scope) + + +def _reset(args): + if not args.yes_to_all: + msg = [ + "Bootstrapping configuration is being reset to Spack's defaults. " + "Current configuration will be lost.\n", + "Do you want to continue?" + ] + ok_to_continue = llnl.util.tty.get_yes_or_no( + ''.join(msg), default=True + ) + if not ok_to_continue: + raise RuntimeError('Aborting') + + for scope in spack.config.config.file_scopes: + # The default scope should stay untouched + if scope.name == 'defaults': + continue + + # If we are in an env scope we can't delete a file, but the best we + # can do is nullify the corresponding configuration + if (scope.name.startswith('env') and + spack.config.get('bootstrap', scope=scope.name)): + spack.config.set('bootstrap', {}, scope=scope.name) + continue + + # If we are outside of an env scope delete the bootstrap.yaml file + bootstrap_yaml = os.path.join(scope.path, 'bootstrap.yaml') + backup_file = bootstrap_yaml + '.bkp' + if os.path.exists(bootstrap_yaml): + shutil.move(bootstrap_yaml, backup_file) + + +def _root(args): + if args.path: + spack.config.set('bootstrap:root', args.path, scope=args.scope) + + root = spack.config.get('bootstrap:root', default=None, scope=args.scope) + if root: + root = spack.util.path.canonicalize_path(root) + print(root) + + +def bootstrap(parser, args): + callbacks = { + 'enable': _enable_or_disable, + 'disable': _enable_or_disable, + 'reset': _reset, + 'root': _root + } + callbacks[args.subcommand](args) diff --git a/lib/spack/spack/cmd/clean.py b/lib/spack/spack/cmd/clean.py index 273b1789ade..3b663582939 100644 --- a/lib/spack/spack/cmd/clean.py +++ b/lib/spack/spack/cmd/clean.py @@ -9,6 +9,7 @@ import llnl.util.tty as tty +import spack.bootstrap import spack.caches import spack.cmd.common.arguments as arguments import spack.cmd.test @@ -102,7 +103,7 @@ def clean(parser, args): if args.bootstrap: msg = 'Removing software in "{0}"' - tty.msg(msg.format(spack.paths.user_bootstrap_store)) - with spack.store.use_store(spack.paths.user_bootstrap_store): + tty.msg(msg.format(spack.bootstrap.store_path())) + with spack.store.use_store(spack.bootstrap.store_path()): uninstall = spack.main.SpackCommand('uninstall') uninstall('-a', '-y') diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index f532b684bd4..875c236164d 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -13,6 +13,7 @@ import llnl.util.tty as tty import llnl.util.tty.color as color +import spack.bootstrap import spack.cmd as cmd import spack.cmd.common.arguments as arguments import spack.environment as ev @@ -207,9 +208,10 @@ def find(parser, args): q_args = query_arguments(args) # Query the current store or the internal bootstrap store if required if args.bootstrap: + bootstrap_store_path = spack.bootstrap.store_path() msg = 'Showing internal bootstrap store at "{0}"' - tty.msg(msg.format(spack.paths.user_bootstrap_store)) - with spack.store.use_store(spack.paths.user_bootstrap_store): + tty.msg(msg.format(bootstrap_store_path)) + with spack.store.use_store(bootstrap_store_path): results = args.specs(**q_args) else: results = args.specs(**q_args) diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 038a879a817..5ceaef8e7ba 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -51,6 +51,7 @@ import spack.compilers import spack.paths import spack.schema +import spack.schema.bootstrap import spack.schema.compilers import spack.schema.config import spack.schema.env @@ -74,6 +75,7 @@ 'modules': spack.schema.modules.schema, 'config': spack.schema.config.schema, 'upstreams': spack.schema.upstreams.schema, + 'bootstrap': spack.schema.bootstrap.schema } # Same as above, but including keys for environments diff --git a/lib/spack/spack/paths.py b/lib/spack/spack/paths.py index 6b41049de85..76eb9dfdac9 100644 --- a/lib/spack/spack/paths.py +++ b/lib/spack/spack/paths.py @@ -11,10 +11,10 @@ """ import os -from llnl.util.filesystem import ancestor +import llnl.util.filesystem #: This file lives in $prefix/lib/spack/spack/__file__ -prefix = ancestor(__file__, 4) +prefix = llnl.util.filesystem.ancestor(__file__, 4) #: synonym for prefix spack_root = prefix @@ -53,7 +53,6 @@ #: User configuration location user_config_path = os.path.expanduser('~/.spack') user_bootstrap_path = os.path.join(user_config_path, 'bootstrap') -user_bootstrap_store = os.path.join(user_bootstrap_path, 'store') reports_path = os.path.join(user_config_path, "reports") monitor_path = os.path.join(reports_path, "monitor") diff --git a/lib/spack/spack/schema/bootstrap.py b/lib/spack/spack/schema/bootstrap.py new file mode 100644 index 00000000000..0505f090033 --- /dev/null +++ b/lib/spack/spack/schema/bootstrap.py @@ -0,0 +1,26 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +"""Schema for bootstrap.yaml configuration file.""" + +properties = { + 'bootstrap': { + 'type': 'object', + 'properties': { + 'enable': {'type': 'boolean'}, + 'root': { + 'type': 'string' + }, + } + } +} + +#: Full schema with metadata +schema = { + '$schema': 'http://json-schema.org/schema#', + 'title': 'Spack bootstrap configuration file schema', + 'type': 'object', + 'additionalProperties': False, + 'properties': properties, +} diff --git a/lib/spack/spack/schema/merged.py b/lib/spack/spack/schema/merged.py index 9555f7b1947..11db4f78df7 100644 --- a/lib/spack/spack/schema/merged.py +++ b/lib/spack/spack/schema/merged.py @@ -10,6 +10,7 @@ """ from llnl.util.lang import union_dicts +import spack.schema.bootstrap import spack.schema.cdash import spack.schema.compilers import spack.schema.config @@ -23,6 +24,7 @@ #: Properties for inclusion in other schemas properties = union_dicts( + spack.schema.bootstrap.properties, spack.schema.cdash.properties, spack.schema.compilers.properties, spack.schema.config.properties, diff --git a/lib/spack/spack/store.py b/lib/spack/spack/store.py index 4fcd96cdd87..a04ece20275 100644 --- a/lib/spack/spack/store.py +++ b/lib/spack/spack/store.py @@ -193,6 +193,7 @@ def deserialize(token): def _store(): """Get the singleton store instance.""" + import spack.bootstrap config_dict = spack.config.get('config') root, unpadded_root, projections = parse_install_tree(config_dict) hash_length = spack.config.get('config:install_hash_length') @@ -201,7 +202,8 @@ def _store(): # reserved by Spack to bootstrap its own dependencies, since this would # lead to bizarre behaviors (e.g. cleaning the bootstrap area would wipe # user installed software) - if spack.paths.user_bootstrap_store == root: + enable_bootstrap = spack.config.get('bootstrap:enable', True) + if enable_bootstrap and spack.bootstrap.store_path() == root: msg = ('please change the install tree root "{0}" in your ' 'configuration [path reserved for Spack internal use]') raise ValueError(msg.format(root)) diff --git a/lib/spack/spack/test/bootstrap.py b/lib/spack/spack/test/bootstrap.py index 97687ddb4df..fccf67e569c 100644 --- a/lib/spack/spack/test/bootstrap.py +++ b/lib/spack/spack/test/bootstrap.py @@ -6,6 +6,7 @@ import spack.bootstrap import spack.store +import spack.util.path @pytest.mark.regression('22294') @@ -22,5 +23,29 @@ def test_store_is_restored_correctly_after_bootstrap(mutable_config, tmpdir): # Test that within the context manager we use the bootstrap store # and that outside we restore the correct location with spack.bootstrap.ensure_bootstrap_configuration(): - assert spack.store.root == spack.paths.user_bootstrap_store + assert spack.store.root == spack.bootstrap.store_path() assert spack.store.root == user_path + + +@pytest.mark.parametrize('config_value,expected', [ + # Absolute path without expansion + ('/opt/spack/bootstrap', '/opt/spack/bootstrap/store'), + # Path with placeholder + ('$spack/opt/bootstrap', '$spack/opt/bootstrap/store'), +]) +def test_store_path_customization(config_value, expected, mutable_config): + # Set the current configuration to a specific value + spack.config.set('bootstrap:root', config_value) + + # Check the store path + current = spack.bootstrap.store_path() + assert current == spack.util.path.canonicalize_path(expected) + + +def test_raising_exception_if_bootstrap_disabled(mutable_config): + # Disable bootstrapping in config.yaml + spack.config.set('bootstrap:enable', False) + + # Check the correct exception is raised + with pytest.raises(RuntimeError, match='bootstrapping is currently disabled'): + spack.bootstrap.store_path() diff --git a/lib/spack/spack/test/cmd/bootstrap.py b/lib/spack/spack/test/cmd/bootstrap.py new file mode 100644 index 00000000000..0537d85faa4 --- /dev/null +++ b/lib/spack/spack/test/cmd/bootstrap.py @@ -0,0 +1,101 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os.path + +import pytest + +import spack.config +import spack.environment +import spack.main + +_bootstrap = spack.main.SpackCommand('bootstrap') + + +@pytest.mark.parametrize('scope', [ + None, 'site', 'system', 'user' +]) +def test_enable_and_disable(mutable_config, scope): + scope_args = [] + if scope: + scope_args = ['--scope={0}'.format(scope)] + + _bootstrap('enable', *scope_args) + assert spack.config.get('bootstrap:enable', scope=scope) is True + + _bootstrap('disable', *scope_args) + assert spack.config.get('bootstrap:enable', scope=scope) is False + + +@pytest.mark.parametrize('scope', [ + None, 'site', 'system', 'user' +]) +def test_root_get_and_set(mutable_config, scope): + scope_args, path = [], '/scratch/spack/bootstrap' + if scope: + scope_args = ['--scope={0}'.format(scope)] + + _bootstrap('root', path, *scope_args) + out = _bootstrap('root', *scope_args, output=str) + assert out.strip() == path + + +@pytest.mark.parametrize('scopes', [ + ('site',), + ('system', 'user') +]) +def test_reset_in_file_scopes(mutable_config, scopes): + # Assert files are created in the right scopes + bootstrap_yaml_files = [] + for s in scopes: + _bootstrap('disable', '--scope={0}'.format(s)) + scope_path = spack.config.config.scopes[s].path + bootstrap_yaml = os.path.join( + scope_path, 'bootstrap.yaml' + ) + assert os.path.exists(bootstrap_yaml) + bootstrap_yaml_files.append(bootstrap_yaml) + + _bootstrap('reset', '-y') + for bootstrap_yaml in bootstrap_yaml_files: + assert not os.path.exists(bootstrap_yaml) + + +def test_reset_in_environment(mutable_mock_env_path, mutable_config): + env = spack.main.SpackCommand('env') + env('create', 'bootstrap-test') + current_environment = spack.environment.read('bootstrap-test') + + with current_environment: + _bootstrap('disable') + assert spack.config.get('bootstrap:enable') is False + _bootstrap('reset', '-y') + # We have no default settings in tests + assert spack.config.get('bootstrap:enable') is None + + # Check that reset didn't delete the entire file + spack_yaml = os.path.join(current_environment.path, 'spack.yaml') + assert os.path.exists(spack_yaml) + + +def test_reset_in_file_scopes_overwrites_backup_files(mutable_config): + # Create a bootstrap.yaml with some config + _bootstrap('disable', '--scope=site') + scope_path = spack.config.config.scopes['site'].path + bootstrap_yaml = os.path.join(scope_path, 'bootstrap.yaml') + assert os.path.exists(bootstrap_yaml) + + # Reset the bootstrap configuration + _bootstrap('reset', '-y') + backup_file = bootstrap_yaml + '.bkp' + assert not os.path.exists(bootstrap_yaml) + assert os.path.exists(backup_file) + + # Iterate another time + _bootstrap('disable', '--scope=site') + assert os.path.exists(bootstrap_yaml) + assert os.path.exists(backup_file) + _bootstrap('reset', '-y') + assert not os.path.exists(bootstrap_yaml) + assert os.path.exists(backup_file) diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index cd5a01c42da..44cc7945fdc 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -333,7 +333,7 @@ _spack() { then SPACK_COMPREPLY="-h --help -H --all-help --color -c --config -C --config-scope -d --debug --timestamp --pdb -e --env -D --env-dir -E --no-env --use-env-repo -k --insecure -l --enable-locks -L --disable-locks -m --mock -p --profile --sorted-profile --lines -v --verbose --stacktrace -V --version --print-shell-vars" else - SPACK_COMPREPLY="activate add analyze arch audit blame build-env buildcache cd checksum ci clean clone commands compiler compilers concretize config containerize create deactivate debug dependencies dependents deprecate dev-build develop docs edit env extensions external fetch find flake8 gc gpg graph help info install license list load location log-parse maintainers mark mirror module monitor patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style test test-env tutorial undevelop uninstall unit-test unload url verify versions view" + SPACK_COMPREPLY="activate add analyze arch audit blame bootstrap build-env buildcache cd checksum ci clean clone commands compiler compilers concretize config containerize create deactivate debug dependencies dependents deprecate dev-build develop docs edit env extensions external fetch find flake8 gc gpg graph help info install license list load location log-parse maintainers mark mirror module monitor patch pkg providers pydoc python reindex remove rm repo resource restage solve spec stage style test test-env tutorial undevelop uninstall unit-test unload url verify versions view" fi } @@ -416,6 +416,36 @@ _spack_blame() { fi } +_spack_bootstrap() { + if $list_options + then + SPACK_COMPREPLY="-h --help" + else + SPACK_COMPREPLY="enable disable reset root" + fi +} + +_spack_bootstrap_enable() { + SPACK_COMPREPLY="-h --help --scope" +} + +_spack_bootstrap_disable() { + SPACK_COMPREPLY="-h --help --scope" +} + +_spack_bootstrap_reset() { + SPACK_COMPREPLY="-h --help -y --yes-to-all" +} + +_spack_bootstrap_root() { + if $list_options + then + SPACK_COMPREPLY="-h --help --scope" + else + SPACK_COMPREPLY="" + fi +} + _spack_build_env() { if $list_options then From 667ab501996058b1f89f1763d1791befa455b1f8 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 12 Jul 2021 19:02:36 -0400 Subject: [PATCH 073/289] c-blosc2: New version 2.0.2 (#24843) --- var/spack/repos/builtin/packages/c-blosc2/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/c-blosc2/package.py b/var/spack/repos/builtin/packages/c-blosc2/package.py index 118220eeda7..ee3c7021cce 100644 --- a/var/spack/repos/builtin/packages/c-blosc2/package.py +++ b/var/spack/repos/builtin/packages/c-blosc2/package.py @@ -17,6 +17,7 @@ class CBlosc2(CMakePackage): maintainers = ['ax3l', 'robert-mijakovic'] version('develop', branch='master') + version('2.0.2', sha256='fba51ba601610441eea6046e384284b2d8d7884922060cf15369d01d713b9b77') version('2.0.1', sha256='35b93dfed479b1dfd9372d41d7843b60254ed1d71792577b95e489c28705874f') variant('avx2', default=True, description='Enable AVX2 support') From 60765d38d06c5ceffa3e65f8fffdc4c7233fddc9 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 11 Jul 2021 13:49:35 -0500 Subject: [PATCH 074/289] Fix KeyboardInterrupt signal for Python 2 --- lib/spack/spack/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index ea65ab99df9..fcf6369df7f 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -782,7 +782,10 @@ def main(argv=None): raise sys.stderr.write('\n') tty.error("Keyboard interrupt.") - return signal.SIGINT.value + if sys.version_info >= (3, 5): + return signal.SIGINT.value + else: + return signal.SIGINT except SystemExit as e: if spack.config.get('config:debug'): From 326fe433b3f4d1393569ce31ffb60fed99fdcb22 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 13 Jul 2021 05:04:41 -0700 Subject: [PATCH 075/289] Add `spack help --spec` to `README.md` (#24849) We don't really advertise `spack help --spec` enough. I think the README is a good place to start doing that. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dcf9f0dcea0..964637da168 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ Documentation [**Full documentation**](https://spack.readthedocs.io/) is available, or run `spack help` or `spack help --all`. +For a cheat sheet on Spack syntax, run `spack help --spec`. + Tutorial ---------------- From 7f24feb5a490b8dd8cc04de842757e15259770fc Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Tue, 13 Jul 2021 14:25:26 +0200 Subject: [PATCH 076/289] cppunit: disable doxygen (#24850) --- var/spack/repos/builtin/packages/cppunit/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/cppunit/package.py b/var/spack/repos/builtin/packages/cppunit/package.py index 13eac4bc3a0..03f29c0f10d 100644 --- a/var/spack/repos/builtin/packages/cppunit/package.py +++ b/var/spack/repos/builtin/packages/cppunit/package.py @@ -26,3 +26,7 @@ def setup_build_environment(self, env): cxxstdflag = '' if cxxstd == 'default' else \ getattr(self.compiler, 'cxx{0}_flag'.format(cxxstd)) env.append_flags('CXXFLAGS', cxxstdflag) + + def configure_args(self): + args = ["--disable-doxygen"] + return args From 1ee89476771ec3d36adfab51336fe10dc4d9ee0e Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Tue, 13 Jul 2021 14:31:11 +0200 Subject: [PATCH 077/289] gaudi: add version 36.0 (#24840) --- var/spack/repos/builtin/packages/gaudi/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gaudi/package.py b/var/spack/repos/builtin/packages/gaudi/package.py index cecd49277d9..d2d5937bb70 100644 --- a/var/spack/repos/builtin/packages/gaudi/package.py +++ b/var/spack/repos/builtin/packages/gaudi/package.py @@ -16,6 +16,7 @@ class Gaudi(CMakePackage): tags = ['hep'] version('master', branch='master') + version('36.0', sha256='8a0458cef5b616532f9db7cca9fa0e892e602b64c9e93dc0cc6d972e03034830') version('35.0', sha256='c01b822f9592a7bf875b9997cbeb3c94dea97cb13d523c12649dbbf5d69b5fa6') version('34.0', sha256='28fc4abb5a6b08da5a6b1300451c7e8487f918b055939877219d454abf7668ae') version('33.2', sha256='26aaf9c4ff237a60ec79af9bd18ad249fc91c16e297ba77e28e4a256123db6e5') From 047c9704dfd278883f7bc100bc9c39e9fd58dd0b Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Tue, 13 Jul 2021 15:10:55 +0200 Subject: [PATCH 078/289] whizard: add version 3.0.1 (#24836) --- var/spack/repos/builtin/packages/whizard/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/whizard/package.py b/var/spack/repos/builtin/packages/whizard/package.py index db93e324c15..093916b8510 100644 --- a/var/spack/repos/builtin/packages/whizard/package.py +++ b/var/spack/repos/builtin/packages/whizard/package.py @@ -20,8 +20,9 @@ class Whizard(AutotoolsPackage): maintainers = ['vvolkl'] version('master', branch="master") + version('3.0.1', sha256='1463abd6c50ffe72029abc6f5a7d28ec63013852bfe5914cb464b58202c1437c') version('3.0.0_alpha', sha256='4636e5a10350bb67ccc98cd105bc891ea04f3393c2420f81be3d21240be20009') - version('2.8.5', sha256='0f633e5620aa7dd50336b492e8a76bfae15b15943ea842010346ad7610818ecd', preferred=True) + version('2.8.5', sha256='0f633e5620aa7dd50336b492e8a76bfae15b15943ea842010346ad7610818ecd') version('2.8.4', sha256='49893f077484470934a9d6e1545bbda7d398076568bceda00880d58132f26432') version('2.8.3', sha256='96a9046682d4b992b477eb96d561c3db789207e1049b60c9bd140db40eb1e5d7') version('2.8.2', sha256='32c9be342d01b3fc6f947fddce74bf2d81ece37fb39bca1f37778fb0c07e2568') From e3e50b3af9c8919b9a4d67446c37c92a010d0d67 Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Tue, 13 Jul 2021 15:11:59 +0200 Subject: [PATCH 079/289] py-awkward: add version 1.4.0 (#24838) --- var/spack/repos/builtin/packages/py-awkward/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-awkward/package.py b/var/spack/repos/builtin/packages/py-awkward/package.py index 309d74dfb33..7d8b0cfa03f 100644 --- a/var/spack/repos/builtin/packages/py-awkward/package.py +++ b/var/spack/repos/builtin/packages/py-awkward/package.py @@ -15,6 +15,8 @@ class PyAwkward(PythonPackage): maintainers = ['vvolkl'] + version('1.4.0', sha256='25ae6114d5962c717cb87e3bc30a2f6eaa232b252cf8c51ba805b8f04664ae0d') + version('1.3.0', sha256='b6021694adec9813842bad1987b837e439dabaf5b0dff9041201d238fca71fb4') version('1.2.3', sha256='7d727542927a926f488fa62d04e2c5728c72660f17f822e627f349285f295063') version('1.2.2', sha256='89f126a072d3a6eee091e1afeed87e0b2ed3c34ed31a1814062174de3cab8d9b') version('1.1.2', sha256='4ae8371d9e6d5bd3e90f3686b433cebc0541c88072655d2c75ec58e79b5d6943') @@ -24,7 +26,7 @@ class PyAwkward(PythonPackage): depends_on('py-setuptools', type='build') - depends_on('python@3.6:', type=('build', 'run')) + depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) depends_on('py-numpy@1.13.1:', type=('build', 'run')) depends_on('py-pybind11', type=('build', 'link')) depends_on('dlpack', when="@1.0.0:") From aaad65fbd82cc6e89ae4546f6cb462c6206a2fb9 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 13 Jul 2021 15:12:10 +0200 Subject: [PATCH 080/289] graphviz: add python dependency to fix installation (#24852) The bootstrap script in the autoreconf procedure calls the gen_version.py script which requires python 3.6 to process f-strings. --- var/spack/repos/builtin/packages/graphviz/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/graphviz/package.py b/var/spack/repos/builtin/packages/graphviz/package.py index 7274f79ad1e..70d19853846 100644 --- a/var/spack/repos/builtin/packages/graphviz/package.py +++ b/var/spack/repos/builtin/packages/graphviz/package.py @@ -116,6 +116,8 @@ class Graphviz(AutotoolsPackage): depends_on('sed', type='build') depends_on('libtool', type='build') depends_on('pkgconfig', type='build') + # to process f-strings used in gen_version.py + depends_on('python@3.6:', when='@2.47:', type='build') conflicts('~doc', when='@:2.45', From 09540d411e0054bfcac0b5d84909aef30f44b179 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Tue, 13 Jul 2021 07:53:35 -0700 Subject: [PATCH 081/289] binary_distribution: relocate x-pie-executable files (#24854) --- lib/spack/spack/binary_distribution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index a9a2cf6af28..31ac93cffe7 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -583,7 +583,7 @@ def get_buildfile_manifest(spec): added = True if relocate.needs_binary_relocation(m_type, m_subtype): - if ((m_subtype in ('x-executable', 'x-sharedlib') + if ((m_subtype in ('x-executable', 'x-sharedlib', 'x-pie-executable') and sys.platform != 'darwin') or (m_subtype in ('x-mach-binary') and sys.platform == 'darwin') or From a6f839b88041d63f831f9205a8621775cc2a4356 Mon Sep 17 00:00:00 2001 From: iarspider Date: Tue, 13 Jul 2021 17:22:34 +0200 Subject: [PATCH 082/289] Add new Cython version (#24853) --- var/spack/repos/builtin/packages/py-cython/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py index 98c3242feca..834087f5399 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -11,6 +11,7 @@ class PyCython(PythonPackage): pypi = "cython/Cython-0.29.21.tar.gz" + version('0.29.23', sha256='6a0d31452f0245daacb14c979c77e093eb1a546c760816b5eed0047686baad8e') version('0.29.22', sha256='df6b83c7a6d1d967ea89a2903e4a931377634a297459652e4551734c48195406') version('0.29.21', sha256='e57acb89bd55943c8d8bf813763d20b9099cc7165c0f16b707631a7654be9cad') version('0.29.20', sha256='22d91af5fc2253f717a1b80b8bb45acb655f643611983fd6f782b9423f8171c7') From e4fa31230c6c5aeca2490190da45bec22c6bf6ff Mon Sep 17 00:00:00 2001 From: Hadrien G Date: Tue, 13 Jul 2021 19:41:45 +0200 Subject: [PATCH 083/289] ACTS package: add version 9.02.0 (#24844) --- var/spack/repos/builtin/packages/acts/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/acts/package.py b/var/spack/repos/builtin/packages/acts/package.py index 5feadd078fe..c7d6119c920 100644 --- a/var/spack/repos/builtin/packages/acts/package.py +++ b/var/spack/repos/builtin/packages/acts/package.py @@ -38,6 +38,7 @@ class Acts(CMakePackage, CudaPackage): # Supported Acts versions version('main', branch='main') version('master', branch='main', deprecated=True) # For compatibility + version('9.02.0', commit='c438ee490e94eaf1c854a336ef54f398da637a48') version('9.01.0', commit='bf8fd4c03dd94f497d8501df510d8f6a48434afd') version('9.00.1', commit='7d59bc508d898d2cb67ba05a7150a978b9fcc32d') version('9.00.0', commit='e6e3092bf3a9411aac7c11a24d7586abddb75d59') From 80813b61ff244795ffd19e025e800d846bc95c08 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Tue, 13 Jul 2021 13:42:23 -0400 Subject: [PATCH 084/289] hdf5: new version 1.12.1 (#24841) --- var/spack/repos/builtin/packages/hdf5/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index e2910bfb5c6..f110700efbc 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -33,6 +33,7 @@ class Hdf5(CMakePackage): version('develop-1.10', branch='hdf5_1_10') version('develop-1.8', branch='hdf5_1_8') + version('1.12.1', sha256='79c66ff67e666665369396e9c90b32e238e501f345afd2234186bfb8331081ca') version('1.12.0', sha256='a62dcb276658cb78e6795dd29bf926ed7a9bc4edf6e77025cd2c689a8f97c17a') # HDF5 1.12 broke API compatibility, so we currently prefer the latest # 1.10 release. packages that want later versions of HDF5 should specify, From 657b3ec0525eef7ba0ef99f58c9b481b3979abf8 Mon Sep 17 00:00:00 2001 From: Jianwen Date: Wed, 14 Jul 2021 01:44:07 +0800 Subject: [PATCH 085/289] blast-plus: add version 2.12.0 (#24828) --- var/spack/repos/builtin/packages/blast-plus/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/blast-plus/package.py b/var/spack/repos/builtin/packages/blast-plus/package.py index 3fb2d4a85b5..2bc4e1e7831 100644 --- a/var/spack/repos/builtin/packages/blast-plus/package.py +++ b/var/spack/repos/builtin/packages/blast-plus/package.py @@ -21,8 +21,11 @@ class BlastPlus(AutotoolsPackage): """Basic Local Alignment Search Tool.""" homepage = "http://blast.ncbi.nlm.nih.gov/" - url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.11.0/ncbi-blast-2.11.0+-src.tar.gz" + url = "https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.12.0/ncbi-blast-2.12.0+-src.tar.gz" + maintainers = ['weijianwen'] + + version('2.12.0', sha256='fda3c9c9d488cad6c1880a98a236d842bcf3610e3e702af61f7a48cf0a714b88') version('2.11.0', sha256='d88e1858ae7ce553545a795a2120e657a799a6d334f2a07ef0330cc3e74e1954') version('2.9.0', sha256='a390cc2d7a09422759fc178db84de9def822cbe485916bbb2ec0d215dacdc257') version('2.8.1', sha256='e03dd1a30e37cb8a859d3788a452c5d70ee1f9102d1ee0f93b2fbd145925118f') From 9828df73354b9b41fb38ae3d90d39f4da6dea4ea Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 13 Jul 2021 12:46:07 -0500 Subject: [PATCH 086/289] py-torch: CUDA 9.2+ required for 1.6+ (#24808) --- var/spack/repos/builtin/packages/py-torch/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index 63c7cac7ccc..1a7b414af58 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -150,6 +150,7 @@ class PyTorch(PythonPackage, CudaPackage): # Optional dependencies depends_on('cuda@7.5:', when='+cuda', type=('build', 'link', 'run')) depends_on('cuda@9:', when='@1.1:+cuda', type=('build', 'link', 'run')) + depends_on('cuda@9.2:', when='@1.6:+cuda', type=('build', 'link', 'run')) depends_on('cudnn@6.0:7.999', when='@:1.0.999+cudnn') depends_on('cudnn@7.0:7.999', when='@1.1.0:1.5.999+cudnn') depends_on('cudnn@7.0:', when='@1.6.0:+cudnn') From 88be996d45c7a980e678252d39b7610ccba5bf32 Mon Sep 17 00:00:00 2001 From: Robert Mijakovic Date: Tue, 13 Jul 2021 20:03:20 +0200 Subject: [PATCH 087/289] scotch: new versions, 6.1.0 and 6.1.1 (#24855) Co-authored-by: Robert Mijakovic --- var/spack/repos/builtin/packages/scotch/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 3e7c6e988f4..73dcdcb03af 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -15,6 +15,8 @@ class Scotch(Package): url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.4.tar.gz" list_url = "http://gforge.inria.fr/frs/?group_id=248" + version('6.1.1', sha256='39052f59ff474a4a69cefc25cf3caf8429400889deba010ee6403ca188f8b311') + version('6.1.0', sha256='a3bc3fa3b243fcb52f8d68de4272562a0328afb18a96f535724d284e36730485') version('6.0.10', sha256='fd8b707b8200823312a1571d97d3776ff3dfd3280cfa4b6e38987153cea5dbda') version('6.0.9', sha256='622b4143cf01c480bb15708b3651b29c25e4aeb00c8c6447ff196aca2eca5c93') version('6.0.8', sha256='0ba3f145026174304f910c8770a3cbb034f213c91d939573751cfbb4fd46d45e') From 3c5287c4588d1e83426875c486ea522be971c1f2 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 13 Jul 2021 21:07:45 +0200 Subject: [PATCH 088/289] py-jupyterlab: fix startup and add 3.0.16 (#24780) jupyterlab was looking for its application directory inside the python prefix instead its own one. This was fixed by setting the according environment variable. --- .../builtin/packages/py-jupyterlab/package.py | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-jupyterlab/package.py b/var/spack/repos/builtin/packages/py-jupyterlab/package.py index 69fbc175ca1..e431f176937 100644 --- a/var/spack/repos/builtin/packages/py-jupyterlab/package.py +++ b/var/spack/repos/builtin/packages/py-jupyterlab/package.py @@ -8,15 +8,38 @@ class PyJupyterlab(PythonPackage): """JupyterLab is the next-generation web-based user interface for Project Jupyter.""" - homepage = "https://jupyterlab.readthedocs.io/" + homepage = "https://github.com/jupyterlab/jupyterlab" pypi = "jupyterlab/jupyterlab-2.2.7.tar.gz" + version('3.0.16', sha256='7ad4fbe1f6d38255869410fd151a8b15692a663ca97c0a8146b3f5c40e275c23') version('2.2.7', sha256='a72ffd0d919cba03a5ef8422bc92c3332a957ff97b0490494209c83ad93826da') version('2.1.0', sha256='8c239aababf5baa0b3d36e375fddeb9fd96f3a9a24a8cda098d6a414f5bbdc81') + depends_on('python@3.6:', when='@3:', type=('build', 'run')) depends_on('python@3.5:', type=('build', 'run')) depends_on('py-setuptools', type=('build', 'run')) - depends_on('py-notebook@4.3.1:', type=('build', 'run')) - depends_on('py-tornado@:5,6.0.3:', type=('build', 'run')) - depends_on('py-jupyterlab-server@1.1.5:1.999', type=('build', 'run')) + depends_on('py-jupyter-packaging@0.9:1.999', when='@3.0.15:', type='build') + depends_on('py-jupyter-packaging@0.7.3:0.7.999', when='@3.0.0:3.0.14', type='build') + # dependency on py-jinja2@2.1 seems to be a migration issue from the switch + # to setup.cfg in 3.0.15, leave it a 2.10 depends_on('py-jinja2@2.10:', type=('build', 'run')) + + # @3: + depends_on('py-ipython', when='@3:', type=('build', 'run')) + depends_on('py-packaging', when='@3:', type=('build', 'run')) + depends_on('py-tornado@6.1.0:', when='@3:', type=('build', 'run')) + depends_on('py-jupyter-core', when='@3:', type=('build', 'run')) + depends_on('py-jupyterlab-server@2.3:2.999', when='@3.0.9:', type=('build', 'run')) + depends_on('py-jupyterlab-server@2.0:2.999', when='@3.0.0:3.0.8', type=('build', 'run')) + depends_on('py-jupyter-server@1.4:1.999', when='@3.0.9:', type=('build', 'run')) + depends_on('py-jupyter-server@1.2:1.999', when='@3.0.3:3.0.8', type=('build', 'run')) + depends_on('py-jupyter-server@1.1:1.999', when='@3.0.0:3.0.2', type=('build', 'run')) + depends_on('py-nbclassic@0.2.0:0.999', when='@3:', type=('build', 'run')) + + # @:3 + depends_on('py-notebook@4.3.1:', when='@:2.99', type=('build', 'run')) + depends_on('py-tornado@:5,6.0.3:', when='@:2.99', type=('build', 'run')) + depends_on('py-jupyterlab-server@1.1.5:1.999', when='@:2.99', type=('build', 'run')) + + def setup_run_environment(self, env): + env.set('JUPYTERLAB_DIR', self.prefix.share.jupyter.lab) From d79022f842cee4517af9e13fc77d6c5f10f26308 Mon Sep 17 00:00:00 2001 From: Frank Willmore Date: Tue, 13 Jul 2021 14:14:29 -0500 Subject: [PATCH 089/289] openmpi: add direct cuda dependency (#24859) makes cuda a direct dependency, so it still shows up when using external hwloc+cuda --- var/spack/repos/builtin/packages/openmpi/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index a1d6bc57b83..c9da2259443 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -284,6 +284,8 @@ class Openmpi(AutotoolsPackage): depends_on('hwloc@:1.999', when='@:3.999.999 ~internal-hwloc') depends_on('hwloc +cuda', when='+cuda ~internal-hwloc') + # Still need cuda as dependent when using external hwloc + depends_on('cuda', when='+cuda ~internal-hwloc') depends_on('java', when='+java') depends_on('sqlite', when='+sqlite3@:1.11') depends_on('zlib', when='@3.0.0:') From 231a36c5fd6a0ee267c67b4fbe48c4db87485bc0 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Tue, 13 Jul 2021 21:31:34 +0200 Subject: [PATCH 090/289] HOHQMesh: add version v1.0.1 (#24823) --- var/spack/repos/builtin/packages/hohqmesh/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/hohqmesh/package.py b/var/spack/repos/builtin/packages/hohqmesh/package.py index 2bf9d5dd3d1..0fb03d2cb11 100644 --- a/var/spack/repos/builtin/packages/hohqmesh/package.py +++ b/var/spack/repos/builtin/packages/hohqmesh/package.py @@ -16,6 +16,7 @@ class Hohqmesh(CMakePackage): maintainers = ['schoonovernumerics'] version('main', branch='main') + version('v1.0.1', tag='v1.0.1') depends_on('ftobjectlibrary') From 9a0febab8964514b7bbf97655e080b8863cec25e Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Tue, 13 Jul 2021 15:55:20 -0400 Subject: [PATCH 091/289] libtirpc: Fix for #24806 (remove -pipe flag when using %nvhpc) (#24807) Makefiles for libtirpc have hardcoded the -pipe flag to the compiler nvhpc compilers do not recognize that flag. This PR provides a patch to remove the -pipe flag from the Makefile. Patch should work with libtirpc@1.2.6 and @1.1.4 --- .../libtirpc-remove-pipe-flag-for-nvhpc.patch | 24 +++++++++++++++++++ .../builtin/packages/libtirpc/package.py | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libtirpc/libtirpc-remove-pipe-flag-for-nvhpc.patch diff --git a/var/spack/repos/builtin/packages/libtirpc/libtirpc-remove-pipe-flag-for-nvhpc.patch b/var/spack/repos/builtin/packages/libtirpc/libtirpc-remove-pipe-flag-for-nvhpc.patch new file mode 100644 index 00000000000..b7a8f00cebd --- /dev/null +++ b/var/spack/repos/builtin/packages/libtirpc/libtirpc-remove-pipe-flag-for-nvhpc.patch @@ -0,0 +1,24 @@ +diff -Naur spack-src/src/Makefile.am spack-src.patch/src/Makefile.am +--- spack-src/src/Makefile.am 2020-04-07 09:24:34.000000000 -0400 ++++ spack-src.patch/src/Makefile.am 2021-07-09 10:52:47.702886134 -0400 +@@ -8,7 +8,7 @@ + noinst_HEADERS = rpc_com.h debug.h + + AM_CPPFLAGS = -I$(top_srcdir)/tirpc -include config.h -DPORTMAP -DINET6 \ +- -D_GNU_SOURCE -Wall -pipe ++ -D_GNU_SOURCE -Wall + + lib_LTLIBRARIES = libtirpc.la + +diff -Naur spack-src/src/Makefile.in spack-src.patch/src/Makefile.in +--- spack-src/src/Makefile.in 2020-04-07 09:26:28.000000000 -0400 ++++ spack-src.patch/src/Makefile.in 2021-07-09 10:52:55.102361747 -0400 +@@ -455,7 +455,7 @@ + top_srcdir = @top_srcdir@ + noinst_HEADERS = rpc_com.h debug.h + AM_CPPFLAGS = -I$(top_srcdir)/tirpc -include config.h -DPORTMAP -DINET6 \ +- -D_GNU_SOURCE -Wall -pipe ++ -D_GNU_SOURCE -Wall + + lib_LTLIBRARIES = libtirpc.la + libtirpc_la_LDFLAGS = @LDFLAG_NOUNDEFINED@ -no-undefined -lpthread \ diff --git a/var/spack/repos/builtin/packages/libtirpc/package.py b/var/spack/repos/builtin/packages/libtirpc/package.py index 94b4667594a..dc7aba62552 100644 --- a/var/spack/repos/builtin/packages/libtirpc/package.py +++ b/var/spack/repos/builtin/packages/libtirpc/package.py @@ -20,6 +20,9 @@ class Libtirpc(AutotoolsPackage): provides('rpc') + # Remove -pipe flag to compiler in Makefiles when using nvhpc + patch('libtirpc-remove-pipe-flag-for-nvhpc.patch', when='%nvhpc') + # FIXME: build error on macOS # auth_none.c:81:9: error: unknown type name 'mutex_t' conflicts('platform=darwin', msg='Does not build on macOS') From df77922d22c9cc8c39601e0fc316799e8badc665 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 13 Jul 2021 23:05:14 +0200 Subject: [PATCH 092/289] py-jupyterlab, py-jupyter-server: fix version range (#24864) Using the original concretizer, trying to concretize py-jupyterlab fails with ``` ==> Error: Invalid Version range: 6.1.0:6.1 ``` because py-tornado does not have a 6.1.0 version but only a 6.1 one. --- var/spack/repos/builtin/packages/py-jupyter-server/package.py | 2 +- var/spack/repos/builtin/packages/py-jupyterlab/package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-jupyter-server/package.py b/var/spack/repos/builtin/packages/py-jupyter-server/package.py index b63cd6ae39d..3301cf8205c 100644 --- a/var/spack/repos/builtin/packages/py-jupyter-server/package.py +++ b/var/spack/repos/builtin/packages/py-jupyter-server/package.py @@ -19,7 +19,7 @@ class PyJupyterServer(PythonPackage): depends_on('python@3.6:', type=('build', 'run')) depends_on('py-setuptools', type='build') depends_on('py-jinja2', type=('build', 'run')) - depends_on('py-tornado@6.1.0:', type=('build', 'run')) + depends_on('py-tornado@6.1:', type=('build', 'run')) depends_on('py-pyzmq@17:', type=('build', 'run')) depends_on('py-argon2-cffi', type=('build', 'run')) depends_on('py-ipython-genutils', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-jupyterlab/package.py b/var/spack/repos/builtin/packages/py-jupyterlab/package.py index e431f176937..2cd581cae3c 100644 --- a/var/spack/repos/builtin/packages/py-jupyterlab/package.py +++ b/var/spack/repos/builtin/packages/py-jupyterlab/package.py @@ -27,7 +27,7 @@ class PyJupyterlab(PythonPackage): # @3: depends_on('py-ipython', when='@3:', type=('build', 'run')) depends_on('py-packaging', when='@3:', type=('build', 'run')) - depends_on('py-tornado@6.1.0:', when='@3:', type=('build', 'run')) + depends_on('py-tornado@6.1:', when='@3:', type=('build', 'run')) depends_on('py-jupyter-core', when='@3:', type=('build', 'run')) depends_on('py-jupyterlab-server@2.3:2.999', when='@3.0.9:', type=('build', 'run')) depends_on('py-jupyterlab-server@2.0:2.999', when='@3.0.0:3.0.8', type=('build', 'run')) From 8ccdcf2e843ec02a1af3d4cf72c5c68236f61e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=B6hler?= Date: Tue, 13 Jul 2021 23:27:49 +0200 Subject: [PATCH 093/289] Octave: add version 6.3.0 (#24851) --- var/spack/repos/builtin/packages/octave/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index 7dcdeed439c..ba6709c8225 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -26,6 +26,7 @@ class Octave(AutotoolsPackage, GNUMirrorPackage): extendable = True + version('6.3.0', sha256='232065f3a72fc3013fe9f17f429a3df69d672c1f6b6077029a31c8f3cd58a66e') version('6.2.0', sha256='457d1fda8634a839e2fd7cfc55b98bd56f36b6ae73d31bb9df43dde3012caa7c') version('6.1.0', sha256='6ff34e401658622c44094ecb67e497672e4337ca2d36c0702d0403ecc60b0a57') version('5.2.0', sha256='2fea62b3c78d6f38e9451da8a4d26023840725977dffee5250d3d180f56595e1') From 819f288587e53c1e5a8e083d4c853cfcd3e35ec0 Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Tue, 13 Jul 2021 17:50:15 -0400 Subject: [PATCH 094/289] MAGMA package: fix smoke test method (#24848) The Makefile for the MAGMA smoke tests uses pkg-config to find the MAGMA compile flags, but the test() routine in the spack package was not configured to provide the location of the pkg-config file. This modification sets PKG_CONFIG_PATH correctly to allow the smoketests to successfully compile. It also removes the *_dir variables which were unused by the magma examples/Makefile. --- .../repos/builtin/packages/magma/package.py | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py index 787e42714ad..14f9c41d3d6 100644 --- a/var/spack/repos/builtin/packages/magma/package.py +++ b/var/spack/repos/builtin/packages/magma/package.py @@ -150,20 +150,19 @@ def cache_test_sources(self): def test(self): test_dir = join_path(self.install_test_root, self.test_src_dir) with working_dir(test_dir, create=False): - magma_dir = 'MAGMADIR={0}'.format(self.prefix) - cuda_dir = 'CUDADIR={0}'.format(self.spec['cuda'].prefix) - blas_dir = 'OPENBLASDIR={0}'.format(self.spec['blas'].prefix) - make(magma_dir, cuda_dir, blas_dir, 'c') - self.run_test('./example_sparse', - purpose='MAGMA smoke test - sparse solver') - self.run_test('./example_sparse_operator', - purpose='MAGMA smoke test - sparse operator') - self.run_test('./example_v1', - purpose='MAGMA smoke test - legacy v1 interface') - self.run_test('./example_v2', - purpose='MAGMA smoke test - v2 interface') - if '+fortran' in self.spec: - make(magma_dir, cuda_dir, blas_dir, 'fortran') - self.run_test('./example_f', - purpose='MAGMA smoke test - Fortran interface') - make('clean') + pkg_config_path = '{0}/lib/pkgconfig'.format(self.prefix) + with spack.util.environment.set_env(PKG_CONFIG_PATH=pkg_config_path): + make('c') + self.run_test('./example_sparse', + purpose='MAGMA smoke test - sparse solver') + self.run_test('./example_sparse_operator', + purpose='MAGMA smoke test - sparse operator') + self.run_test('./example_v1', + purpose='MAGMA smoke test - legacy v1 interface') + self.run_test('./example_v2', + purpose='MAGMA smoke test - v2 interface') + if '+fortran' in self.spec: + make('fortran') + self.run_test('./example_f', + purpose='MAGMA smoke test - Fortran interface') + make('clean') From 04520ebdea4f32881f3f4cf697e1514d25feed27 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 14 Jul 2021 00:01:54 +0200 Subject: [PATCH 095/289] py-cryptography: add 3.4.7 (#24866) --- .../packages/py-cryptography/package.py | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-cryptography/package.py b/var/spack/repos/builtin/packages/py-cryptography/package.py index ccd240519a3..5c80b4aa342 100644 --- a/var/spack/repos/builtin/packages/py-cryptography/package.py +++ b/var/spack/repos/builtin/packages/py-cryptography/package.py @@ -14,24 +14,31 @@ class PyCryptography(PythonPackage): homepage = "https://github.com/pyca/cryptography" pypi = "cryptography/cryptography-1.8.1.tar.gz" + version('3.4.7', sha256='3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713') version('2.7', sha256='e6347742ac8f35ded4a46ff835c60e68c22a536a8ae5c4422966d06946b6d4c6') version('2.3.1', sha256='8d10113ca826a4c29d5b85b2c4e045ffa8bad74fb525ee0eceb1d38d4c70dfd6') version('1.8.1', sha256='323524312bb467565ebca7e50c8ae5e9674e544951d28a2904a50012a8828190') variant('idna', default=False, description='Deprecated U-label support') - conflicts('+idna', when='@:2.4') + conflicts('+idna', when='@:2.4,3.1:') # dependencies taken from https://github.com/pyca/cryptography/blob/master/setup.py - depends_on('python@2.6:2.8,3.4:', type=('build', 'run')) + depends_on('python@3.6:', when='@3.4:', type=('build', 'run')) depends_on('python@2.7:2.8,3.4:', when='@2.3.1:', type=('build', 'run')) + depends_on('python@2.6:2.8,3.4:', type=('build', 'run')) - depends_on('py-setuptools@20.5:', type='build') + depends_on('py-setuptools@40.6:', when='@2.7:', type='build') + depends_on('py-setuptools@18.5:', when='@2.2:2.6', type='build') + depends_on('py-setuptools@11.3:', when='@:2.1', type='build') + depends_on('py-setuptools-rust@0.11.4:', when='@3.4:', type=('build', 'run')) - depends_on('py-cffi@1.4.1:', type=('build', 'run')) - depends_on('py-cffi@1.8:1.11.2,1.11.4:', type=('build', 'run'), when='@2.7:') + depends_on('py-cffi@1.12:', when='@3.3:', type=('build', 'run')) + depends_on('py-cffi@1.8:1.11.2,1.11.4:', when='@2.5:3.2', type=('build', 'run')) + depends_on('py-cffi@1.7:1.11.2,1.11.4:', when='@1.9:2.4.2', type=('build', 'run')) + depends_on('py-cffi@1.4.1:', type=('build', 'run')) - depends_on('py-asn1crypto@0.21.0:', type=('build', 'run')) - depends_on('py-six@1.4.1:', type=('build', 'run')) + depends_on('py-asn1crypto@0.21.0:', type=('build', 'run'), when='@:2.7') + depends_on('py-six@1.4.1:', type=('build', 'run'), when='@:3.3') depends_on('py-idna@2.1:', type=('build', 'run'), when='@:2.4') # deprecated depends_on('py-idna@2.1:', type=('build', 'run'), when='@2.5: +idna') # deprecated depends_on('py-enum34', type=('build', 'run'), when='^python@:3.4') From e1d7275f92004f1900328b1438a1263ce0538018 Mon Sep 17 00:00:00 2001 From: Mauricio Ferrato Date: Tue, 13 Jul 2021 18:22:55 -0400 Subject: [PATCH 096/289] flecsph package: use cxxstd=17 and external cinch (#24856) --- var/spack/repos/builtin/packages/flecsph/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/flecsph/package.py b/var/spack/repos/builtin/packages/flecsph/package.py index bf4c7a275c0..d79442f6af5 100644 --- a/var/spack/repos/builtin/packages/flecsph/package.py +++ b/var/spack/repos/builtin/packages/flecsph/package.py @@ -22,10 +22,10 @@ class Flecsph(CMakePackage): variant('test', default=True, description='Adding tests') depends_on('cmake@3.15:', type='build') - depends_on('boost@1.70.0: cxxstd=14 +program_options') + depends_on('boost@1.70.0: cxxstd=17 +program_options') depends_on('mpi') depends_on('hdf5+hl@1.8:') - depends_on('flecsi@1 +cinch backend=mpi') + depends_on('flecsi@1.4.2 +external_cinch backend=mpi') depends_on('gsl') depends_on('googletest', when='+test') depends_on("pkgconfig", type='build') From 28872955d533d919f6336b51f4184b060f12b0b2 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Tue, 13 Jul 2021 18:50:56 -0700 Subject: [PATCH 097/289] Limit Gdal Version for Grass and Add Version 7.8.5 (#24737) --- var/spack/repos/builtin/packages/grass/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/grass/package.py b/var/spack/repos/builtin/packages/grass/package.py index 17325d2b5c7..588de1ad47e 100644 --- a/var/spack/repos/builtin/packages/grass/package.py +++ b/var/spack/repos/builtin/packages/grass/package.py @@ -13,13 +13,14 @@ class Grass(AutotoolsPackage): graphics and maps production, spatial modeling, and visualization.""" homepage = "https://grass.osgeo.org" - url = "https://grass.osgeo.org/grass78/source/grass-7.8.2.tar.gz" + url = "https://grass.osgeo.org/grass78/source/grass-7.8.5.tar.gz" list_url = "https://grass.osgeo.org/download/software/sources/" git = "https://github.com/OSGeo/grass.git" maintainers = ['adamjstewart'] version('master', branch='master') + version('7.8.5', sha256='a359bb665524ecccb643335d70f5436b1c84ffb6a0e428b78dffebacd983ff37') version('7.8.2', sha256='33576f7078f805b39ca20c2fa416ac79c64260c0581072a6dc7d813f53aa9abb') version('7.8.1', sha256='6ae578fd67afcce7abec4ba4505dcc55b3d2dfe0ca46b99d966cb148c654abb3') version('7.8.0', sha256='4b1192294e959ffd962282344e4ff325c4472f73abe605e246a1da3beda7ccfa') @@ -93,7 +94,7 @@ class Grass(AutotoolsPackage): depends_on('opencl', when='+opencl') depends_on('bzip2', when='+bzlib') depends_on('zstd', when='+zstd') - depends_on('gdal', when='+gdal') # required? + depends_on('gdal@:3.2.999', when='+gdal') depends_on('liblas', when='+liblas') depends_on('wxwidgets', when='+wxwidgets') depends_on('py-wxpython@2.8.10.1:', when='+wxwidgets', type=('build', 'run')) From 94767ea57364a387d138fa68baf493b0ab03291b Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 14 Jul 2021 04:36:14 +0200 Subject: [PATCH 098/289] py-setuptools-rust: add 0.12.1 (#24863) * py-setuptools-rust: add 0.12.1 * mark 0.10.6 as deprecated and fix style --- .../packages/py-setuptools-rust/package.py | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-setuptools-rust/package.py b/var/spack/repos/builtin/packages/py-setuptools-rust/package.py index b7f36d6b019..868bc5007a2 100644 --- a/var/spack/repos/builtin/packages/py-setuptools-rust/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools-rust/package.py @@ -3,16 +3,35 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from spack import * + class PySetuptoolsRust(PythonPackage): """Setuptools rust extension plugin.""" homepage = "https://github.com/PyO3/setuptools-rust" - url = "https://github.com/PyO3/setuptools-rust/archive/v0.10.6.tar.gz" + pypi = "setuptools-rust/setuptools-rust-0.12.1.tar.gz" - version('0.10.6', sha256='1446d3985e4aaf4cc679fda8a48a73ac1390b627c8ae1bebe7d9e08bb3b33769') + version('0.12.1', sha256='647009e924f0ae439c7f3e0141a184a69ad247ecb9044c511dabde232d3d570e') + # Version 0.10.6 is not available on pypi and can only be found on github + version('0.10.6', sha256='1446d3985e4aaf4cc679fda8a48a73ac1390b627c8ae1bebe7d9e08bb3b33769', + # version specific url is not used here because spack checksum would + # use it instead of pypi (see #24668) + # url="https://github.com/PyO3/setuptools-rust/archive/v0.10.6.tar.gz", + deprecated=True) + depends_on('python@3.6:', when='@0.12:', type=('build', 'run')) + depends_on('py-setuptools@46.1:', when='@0.11.6:', type='build') depends_on('py-setuptools', type='build') + depends_on('py-setuptools-scm+toml@3.4.3:', when='@0.11:', type='build') depends_on('py-semantic-version@2.6.0:', type=('build', 'run')) depends_on('py-toml@0.9.0:', type=('build', 'run')) depends_on('rust', type='run') + + # when #24668 is fixed remove url_for_version and use url= (see above) for + # version 0.10.6 + def url_for_version(self, version): + if version >= Version('0.12.0'): + return 'https://files.pythonhosted.org/packages/source/s/setuptools-rust/setuptools-rust-{0}.tar.gz'.format(version) + else: + return 'https://github.com/PyO3/setuptools-rust/archive/v{0}.tar.gz'.format(version) From f095383caf16aa95fcc0e222cc73b0fc97d40794 Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Tue, 13 Jul 2021 22:38:12 -0400 Subject: [PATCH 099/289] New package: py-torchmeta (#24596) * first build of py-torchmeta * updated versions for torchvision and torch * [py-torchmeta] using pil provider Co-authored-by: Sid Pendelberry --- .../builtin/packages/py-torchmeta/package.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-torchmeta/package.py diff --git a/var/spack/repos/builtin/packages/py-torchmeta/package.py b/var/spack/repos/builtin/packages/py-torchmeta/package.py new file mode 100644 index 00000000000..e2400926ab8 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-torchmeta/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyTorchmeta(PythonPackage): + """A collection of extensions and data-loaders for few-shot learning & + meta-learning in PyTorch. Torchmeta contains popular meta-learning + benchmarks, fully compatible with both torchvision and PyTorch's DataLoader.""" + + homepage = "https://github.com/tristandeleu/pytorch-meta" + pypi = "torchmeta/torchmeta-1.7.0.tar.gz" + + version('1.7.0', sha256='148d42b6a1ec27970408f7bcb97cf1cb203f8699214e06424fe43d78faa848d9') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-numpy@1.14:', type=('build', 'run')) + depends_on('py-torch@1.4.0:1.8.999', type=('build', 'run')) + depends_on('py-torchvision@0.5.0:0.9.999', type=('build', 'run')) + depends_on('pil@7.0:', type=('build', 'run')) + depends_on('py-h5py', type=('build', 'run')) + depends_on('py-tqdm@4.0.0:', type=('build', 'run')) + depends_on('py-requests', type=('build', 'run')) + depends_on('py-ordered-set', type=('build', 'run')) From e3fdbb976ea15ead661ec87cf07f4192632b6b9f Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Tue, 13 Jul 2021 22:58:10 -0400 Subject: [PATCH 100/289] [py-transformers] added version 4.6.1 (#24571) * [py-transformers] can now use newer versions of tokenizers * [py-transformers] Added version 4.6.1 * [py-transformers] removing old patch * [py-transformers] boto3 no longer needed --- .../builtin/packages/py-transformers/package.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-transformers/package.py b/var/spack/repos/builtin/packages/py-transformers/package.py index 732347591be..422f61f01d0 100644 --- a/var/spack/repos/builtin/packages/py-transformers/package.py +++ b/var/spack/repos/builtin/packages/py-transformers/package.py @@ -13,17 +13,29 @@ class PyTransformers(PythonPackage): maintainers = ['adamjstewart'] + version('4.6.1', sha256='83dbff763b7e7dc57cbef1a6b849655d4fcab6bffdd955c5e8bea12a4f76dc10') version('2.8.0', sha256='b9f29cdfd39c28f29e0806c321270dea337d6174a7aa60daf9625bf83dbb12ee') depends_on('python@3.6:', type=('build', 'run')) depends_on('py-setuptools', type='build') + depends_on('py-numpy', type=('build', 'run')) - depends_on('py-tokenizers@0.5.2', type=('build', 'run')) + depends_on('py-numpy@1.17:', when='@4.6.1:', type=('build', 'run')) + + depends_on('py-tokenizers', type=('build', 'run')) + depends_on('py-tokenizers@0.10.1:0.10.999', when='@4.6.1:', type=('build', 'run')) + depends_on('py-dataclasses', when='^python@:3.6', type=('build', 'run')) - depends_on('py-boto3', type=('build', 'run')) + depends_on('py-boto3', when='@2.8.0', type=('build', 'run')) depends_on('py-filelock', type=('build', 'run')) depends_on('py-requests', type=('build', 'run')) depends_on('py-tqdm@4.27:', type=('build', 'run')) depends_on('py-regex@:2019.12.16,2019.12.18:', type=('build', 'run')) + depends_on('py-sentencepiece', type=('build', 'run')) + depends_on('py-sentencepiece@0.1.91', when='@4.6.1:', type=('build', 'run')) + depends_on('py-sacremoses', type=('build', 'run')) + depends_on('py-importlib-metadata', when='@4.6.1: ^python@:3.7.999', type=('build', 'run')) + depends_on('py-huggingface-hub@0.0.8', when='@4.6.1:', type=('build', 'run')) + depends_on('py-packaging', when='@4.6.1:', type=('build', 'run')) From 652f35a39fd9c2b652eb5a0d87dc0ac28380b1ed Mon Sep 17 00:00:00 2001 From: Kai Torben Ohlhus Date: Wed, 14 Jul 2021 20:07:16 +0900 Subject: [PATCH 101/289] openblas: add version 0.3.16 (#24872) --- var/spack/repos/builtin/packages/openblas/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 2e28011a8e1..3f98db8fbce 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -18,6 +18,7 @@ class Openblas(MakefilePackage): git = 'https://github.com/xianyi/OpenBLAS.git' version('develop', branch='develop') + version('0.3.16', sha256='fa19263c5732af46d40d3adeec0b2c77951b67687e670fb6ba52ea3950460d79') version('0.3.15', sha256='30a99dec977594b387a17f49904523e6bc8dd88bd247266e83485803759e4bbe') version('0.3.14', sha256='d381935d26f9cae8e4bbd7d7f278435adf8e3a90920edf284bb9ad789ee9ad60') version('0.3.13', sha256='79197543b17cc314b7e43f7a33148c308b0807cd6381ee77f77e15acf3e6459e') From c33ec328fb8015b0bb62bacd6a7caeb181c15c78 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Wed, 14 Jul 2021 12:33:57 +0100 Subject: [PATCH 102/289] Add py-h5py version 3.3.0 (#24781) * Add py-h5py version 3.3.0 The mpi4py dependency was bumped to 3.0.2 in setup.py. I'm not sure if that's actually required or not, but nothing lower is still tested. * Use environment variable to stop h5py using setuptools setup_requires feature * Add myself as a maintainer for py-h5py --- .../py-h5py/h5py-3-setuprequires.patch | 21 ------------------- .../repos/builtin/packages/py-h5py/package.py | 16 +++++++------- 2 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/py-h5py/h5py-3-setuprequires.patch diff --git a/var/spack/repos/builtin/packages/py-h5py/h5py-3-setuprequires.patch b/var/spack/repos/builtin/packages/py-h5py/h5py-3-setuprequires.patch deleted file mode 100644 index c8c66547362..00000000000 --- a/var/spack/repos/builtin/packages/py-h5py/h5py-3-setuprequires.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur h5py-3.1.0/setup.py h5py-3.1.0.patch/setup.py ---- h5py-3.1.0/setup.py 2020-11-06 14:25:11.000000000 +0000 -+++ h5py-3.1.0.patch/setup.py 2021-03-04 20:12:19.913405154 +0000 -@@ -49,14 +49,14 @@ - f"Cython >=0.29; python_version<'3.8'", - f"Cython >=0.29.14; python_version>='3.8'", - ] + [ -- f"numpy =={np_min}; python_version{py_condition}" -+ f"numpy >={np_min}; python_version{py_condition}" - for np_min, py_condition in NUMPY_MIN_VERSIONS - ] - - if setup_configure.mpi_enabled(): - RUN_REQUIRES.append('mpi4py >=3.0.0') -- SETUP_REQUIRES.append("mpi4py ==3.0.0; python_version<'3.8'") -- SETUP_REQUIRES.append("mpi4py ==3.0.3; python_version>='3.8'") -+ SETUP_REQUIRES.append("mpi4py >=3.0.0; python_version<'3.8'") -+ SETUP_REQUIRES.append("mpi4py >=3.0.3; python_version>='3.8'") - - # Set the environment variable H5PY_SETUP_REQUIRES=0 if we need to skip - # setup_requires for any reason. diff --git a/var/spack/repos/builtin/packages/py-h5py/package.py b/var/spack/repos/builtin/packages/py-h5py/package.py index a1351d47970..bab55b7fe14 100644 --- a/var/spack/repos/builtin/packages/py-h5py/package.py +++ b/var/spack/repos/builtin/packages/py-h5py/package.py @@ -11,11 +11,12 @@ class PyH5py(PythonPackage): HDF5 library from Python.""" homepage = "http://www.h5py.org/" - pypi = "h5py/h5py-3.2.1.tar.gz" + pypi = "h5py/h5py-3.3.0.tar.gz" git = "https://github.com/h5py/h5py.git" - maintainers = ['bryanherman'] + maintainers = ['bryanherman', 'takluyver'] version('master', branch='master') + version('3.3.0', sha256='e0dac887d779929778b3cfd13309a939359cc9e74756fc09af7c527a82797186') version('3.2.1', sha256='89474be911bfcdb34cbf0d98b8ec48b578c27a89fdb1ae4ee7513f1ef8d9249e') version('3.2.0', sha256='4271c1a4b7d87aa76fe96d016368beb05a6c389d64882d58036964ce7d2d03c1') version('3.1.0', sha256='1e2516f190652beedcb8c7acfa1c6fa92d99b42331cbef5e5c7ec2d65b0fc3c2') @@ -61,13 +62,10 @@ class PyH5py(PythonPackage): depends_on('hdf5+mpi', when='+mpi') depends_on('mpi', when='+mpi') depends_on('py-mpi4py', when='@:2.99 +mpi', type=('build', 'run')) - depends_on('py-mpi4py@3.0.0:', when='@3.0.0:+mpi^python@3.0.0:3.7.99', type=('build', 'run')) + depends_on('py-mpi4py@3.0.0:', when='@3.0.0:3.2.99+mpi^python@3.0.0:3.7.99', type=('build', 'run')) + depends_on('py-mpi4py@3.0.2:', when='@3.3.0:+mpi^python@3.0.0:3.7.99', type=('build', 'run')) depends_on('py-mpi4py@3.0.3:', when='@3.0.0:+mpi^python@3.8.0:', type=('build', 'run')) - # For version 3+, patch setup.py to allow setup_requires list to be more abstract. - # Required for offline installations with version 3+ - patch('h5py-3-setuprequires.patch', when="@3.0.0:") - phases = ['configure', 'install'] def setup_build_environment(self, env): @@ -76,6 +74,10 @@ def setup_build_environment(self, env): env.set('CC', self.spec['mpi'].mpicc) env.set('HDF5_MPI', 'ON') + # Disable build requirements meant for Python build tools, which pin + # versions of numpy & mpi4py. + env.set('H5PY_SETUP_REQUIRES', '0') + @when('@3.0.0:') def configure(self, spec, prefix): pass From b37bf93aa207f2e124f48c2c6283b29f2016302b Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Wed, 14 Jul 2021 14:17:21 +0200 Subject: [PATCH 103/289] environment-modules: add v4.8.0 (#24874) --- .../repos/builtin/packages/environment-modules/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/environment-modules/package.py b/var/spack/repos/builtin/packages/environment-modules/package.py index e3f9a4616f2..2af0caadff9 100644 --- a/var/spack/repos/builtin/packages/environment-modules/package.py +++ b/var/spack/repos/builtin/packages/environment-modules/package.py @@ -10,10 +10,11 @@ class EnvironmentModules(Package): """ homepage = 'https://cea-hpc.github.io/modules/' - url = 'https://github.com/cea-hpc/modules/releases/download/v4.7.1/modules-4.7.1.tar.gz' + url = 'https://github.com/cea-hpc/modules/releases/download/v4.8.0/modules-4.8.0.tar.gz' maintainers = ['xdelaruelle'] + version('4.8.0', sha256='d6b45cadc2146ed5e0b25a96d44643ad516054eb7745acb14a1dc7bf30744f6e') version('4.7.1', sha256='ee7ecd62bbbde6d51e30788a97800c39e72515b6a910839fb84041b35ba42b4d') version('4.7.0', sha256='3ab0a649e23b4dd00963e4cae60e573b449194ecb4035c5ce487330b272b4d06') version('4.6.1', sha256='3445df39abe5838b94552b53e7dbff56ada8347b9fdc6c04a72297d5b04af76f') From 555c054984afffbc6cc376be1b72da982d3638bc Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Wed, 14 Jul 2021 08:51:23 -0400 Subject: [PATCH 104/289] Added new version 2.6.1 (#24871) --- var/spack/repos/builtin/packages/magma/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py index 14f9c41d3d6..15aef600967 100644 --- a/var/spack/repos/builtin/packages/magma/package.py +++ b/var/spack/repos/builtin/packages/magma/package.py @@ -21,6 +21,7 @@ class Magma(CMakePackage, CudaPackage, ROCmPackage): test_requires_compiler = True version('master', branch='master') + version('2.6.1', sha256='6cd83808c6e8bc7a44028e05112b3ab4e579bcc73202ed14733f66661127e213') version('2.6.0', sha256='50cdd384f44f06a34469e7125f8b2ffae13c1975d373c3f1510d91be2b7638ec') version('2.5.4', sha256='7734fb417ae0c367b418dea15096aef2e278a423e527c615aab47f0683683b67') version('2.5.3', sha256='c602d269a9f9a3df28f6a4f593be819abb12ed3fa413bba1ff8183de721c5ef6') From e6e21b16d8489129cc60f0e83402da5f9ed99b2e Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Wed, 14 Jul 2021 14:53:01 +0200 Subject: [PATCH 105/289] py-particle: add version 0.15.1 (#24834) --- var/spack/repos/builtin/packages/py-particle/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-particle/package.py b/var/spack/repos/builtin/packages/py-particle/package.py index 2a53657f35a..d16ea9eccc1 100644 --- a/var/spack/repos/builtin/packages/py-particle/package.py +++ b/var/spack/repos/builtin/packages/py-particle/package.py @@ -27,7 +27,8 @@ class PyParticle(PythonPackage): depends_on('py-setuptools', type='build') depends_on('py-attrs@19.2.0:', type=('build', 'run')) - depends_on('py-hepunits@1.2.0:', type=('build', 'run')) + depends_on('py-hepunits@1.2.0:', when='@:0.12', type=('build', 'run')) + depends_on('py-hepunits@2.0.0:', when='@0.13:', type=('build', 'run')) depends_on('py-importlib-resources@1.0:', when='^python@:3.6', type=('build', 'run')) depends_on('py-enum34@1.1:', when='^python@:3.3', type=('build', 'run')) From 56c8f533cde590caca8afaec79a071336cb80f17 Mon Sep 17 00:00:00 2001 From: Zack Galbreath Date: Wed, 14 Jul 2021 11:45:41 -0400 Subject: [PATCH 106/289] py-setuptools-scm: change default to +toml (#24884) --- var/spack/repos/builtin/packages/py-setuptools-scm/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-setuptools-scm/package.py b/var/spack/repos/builtin/packages/py-setuptools-scm/package.py index dcfe7287266..8997a449189 100644 --- a/var/spack/repos/builtin/packages/py-setuptools-scm/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools-scm/package.py @@ -19,7 +19,7 @@ class PySetuptoolsScm(PythonPackage): version('3.1.0', sha256='1191f2a136b5e86f7ca8ab00a97ef7aef997131f1f6d4971be69a1ef387d8b40') version('1.15.6', sha256='49ab4685589986a42da85706b3311a2f74f1af567d39fee6cb1e088d7a75fb5f') - variant('toml', default=False, description='Build with TOML support') + variant('toml', default=True, description='Build with TOML support') depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) depends_on('python@2.7:2.8,3.5:', when='@4:', type=('build', 'run')) From a9e7f3a4e717b6e0385d6a987326b171c6bfc15a Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Wed, 14 Jul 2021 11:35:27 -0700 Subject: [PATCH 107/289] scotch: use https (#24891) --- var/spack/repos/builtin/packages/scotch/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index 73dcdcb03af..7aa55290c95 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -12,8 +12,8 @@ class Scotch(Package): homepage = "https://gitlab.inria.fr/scotch/scotch" git = "https://gitlab.inria.fr/scotch/scotch.git" - url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.4.tar.gz" - list_url = "http://gforge.inria.fr/frs/?group_id=248" + url = "https://gforge.inria.fr/frs/download.php/latestfile/298/scotch_6.0.4.tar.gz" + list_url = "https://gforge.inria.fr/frs/?group_id=248" version('6.1.1', sha256='39052f59ff474a4a69cefc25cf3caf8429400889deba010ee6403ca188f8b311') version('6.1.0', sha256='a3bc3fa3b243fcb52f8d68de4272562a0328afb18a96f535724d284e36730485') @@ -70,7 +70,7 @@ class Scotch(Package): # always grab these versions for older Scotch versions for simplicity. @when('@:6.0.0') def url_for_version(self, version): - url = "http://gforge.inria.fr/frs/download.php/latestfile/298/scotch_{0}_esmumps.tar.gz" + url = "https://gforge.inria.fr/frs/download.php/latestfile/298/scotch_{0}_esmumps.tar.gz" return url.format(version) @property From 3004f33c58590c4b5fc6ce513099969fbfc35bcc Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Wed, 14 Jul 2021 14:58:31 -0400 Subject: [PATCH 108/289] spec may be a string, use precomputed namespace (#24867) --- lib/spack/spack/repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 706fe40dd26..ef1d684cadd 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -662,7 +662,7 @@ def repo_for_pkg(self, spec): if namespace: fullspace = get_full_namespace(namespace) if fullspace not in self.by_namespace: - raise UnknownNamespaceError(spec.namespace) + raise UnknownNamespaceError(namespace) return self.by_namespace[fullspace] # If there's no namespace, search in the RepoPath. From 369ccb953f602d0af6bfbd85d29e44e291650e80 Mon Sep 17 00:00:00 2001 From: Luhan Cheng Date: Thu, 15 Jul 2021 05:40:02 +1000 Subject: [PATCH 109/289] Fix inconsistent arch arguments expected in cudnn package (#24882) * change aarch64sbsa to aarch64 * fixing arch in url * making ci pipeline happy * removing comments Co-authored-by: Luhan Cheng --- var/spack/repos/builtin/packages/cudnn/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/cudnn/package.py b/var/spack/repos/builtin/packages/cudnn/package.py index 52ee22ec8a3..d6608ebcd04 100644 --- a/var/spack/repos/builtin/packages/cudnn/package.py +++ b/var/spack/repos/builtin/packages/cudnn/package.py @@ -13,7 +13,7 @@ '8.2.0.53-11.3': { 'Linux-x86_64': '7a195dc93a7cda2bdd4d9b73958d259c784be422cd941a9a625aab75309f19dc', 'Linux-ppc64le': 'cfe06735671a41a5e25fc7542d740177ac8eab1ab146bd30f19e0fa836895611', - 'Linux-aarch64sbsa': '0f44af94eef7826dc7b41f92aade3d5210891cdb10858bc0a28ba7167909ab7c'}, + 'Linux-aarch64': '0f44af94eef7826dc7b41f92aade3d5210891cdb10858bc0a28ba7167909ab7c'}, '8.2.0.53-10.2': { 'Linux-x86_64': '6ecbc98b3795e940ce0831ffb7cd2c0781830fdd6b1911f950bcaf6d569f807c'}, @@ -21,7 +21,7 @@ '8.1.1.33-11.2': { 'Linux-x86_64': '98a8784e92862f20018d20c281b30d4a0cd951f93694f6433ccf4ae9c502ba6a', 'Linux-ppc64le': 'c3e535a5d633ad8f4d50be0b6f8efd084c6c6ed3525c07cbd89fc508b1d76c7a', - 'Linux-aarch64sbsa': '4f7e4f5698539659d51f28dff0da11e5445a5ae58439af1d8a8e9f2d93535245'}, + 'Linux-aarch64': '4f7e4f5698539659d51f28dff0da11e5445a5ae58439af1d8a8e9f2d93535245'}, '8.1.1.33-10.2': { 'Linux-x86_64': '2a4a7b99a6e9bfa690eb19bb41e49553f2a7a491a5b3abfcae900e166c5b6ebd'}, @@ -29,14 +29,14 @@ '8.1.0.77-11.2': { 'Linux-x86_64': 'dbe82faf071d91ba9bcf00480146ad33f462482dfee56caf4479c1b8dabe3ecb', 'Linux-ppc64le': '0d3f8fa21959e9f94889841cc8445aecf41d2f3c557091b447313afb43034037', - 'Linux-aarch64sbsa': 'ba16ff486b68a8b50b69b32702612634954de529f39cfff68c12b8bfc1958499'}, + 'Linux-aarch64': 'ba16ff486b68a8b50b69b32702612634954de529f39cfff68c12b8bfc1958499'}, '8.1.0.77-10.2': { 'Linux-x86_64': 'c5bc617d89198b0fbe485156446be15a08aee37f7aff41c797b120912f2b14b4'}, # cuDNN 8.0.5 '8.0.5.39-11.1': { 'Linux-x86_64': '1d046bfa79399dabcc6f6cb1507918754439442ea0ca9e0fbecdd446f9b00cce', - 'Linux-aarch64sbsa': '0c3542c51b42131247cd9f839d0ebefe4e02bb46d1716be1682cb2919278085a'}, + 'Linux-aarch64': '0c3542c51b42131247cd9f839d0ebefe4e02bb46d1716be1682cb2919278085a'}, '8.0.5.39-11.0': { 'Linux-x86_64': '4e16ee7895deb4a8b1c194b812ba49586ef7d26902051401d3717511898a9b73', 'Linux-ppc64le': '05207a02c0b4f22464dbb0ee646693df4a70ae557640ba576ba8678c26393004'}, @@ -189,7 +189,6 @@ class Cudnn(Package): # https://developer.nvidia.com/rdp/cudnn-archive # Note that download links don't work from command line, # need to use modified URLs like in url_for_version. - maintainers = ['adamjstewart', 'bvanessen'] for ver, packages in _versions.items(): @@ -209,7 +208,8 @@ def url_for_version(self, version): # Get the system and machine arch for building the file path sys = "{0}-{1}".format(platform.system(), platform.machine()) # Munge it to match Nvidia's naming scheme - sys_key = sys.lower().replace('x86_64', 'x64').replace('darwin', 'osx') + sys_key = sys.lower().replace('x86_64', 'x64').replace('darwin', 'osx') \ + .replace('aarch64', 'aarch64sbsa') if version >= Version('7.2'): directory = version[:3] From b24ba28774e9e73e2da9265fc0aacacf42ec164e Mon Sep 17 00:00:00 2001 From: robgics <32717310+robgics@users.noreply.github.com> Date: Wed, 14 Jul 2021 15:55:28 -0400 Subject: [PATCH 110/289] Add ampl package (#24105) --- .../repos/builtin/packages/ampl/package.py | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ampl/package.py diff --git a/var/spack/repos/builtin/packages/ampl/package.py b/var/spack/repos/builtin/packages/ampl/package.py new file mode 100644 index 00000000000..6672dc04c11 --- /dev/null +++ b/var/spack/repos/builtin/packages/ampl/package.py @@ -0,0 +1,58 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os + +from spack import * + + +class Ampl(Package): + """AMPL integrates a modeling language for describing optimization data, variables, + objectives, and constraints; a command language for debugging models and analyzing + results; and a scripting language for manipulating data and implementing + optimization strategies.""" + + homepage = "https://ampl.com/" + manual_download = True + + # Use the version as you would expect the user to know it, not necessarily the + # version as it appears in the file name. To get the checksum, use sha256sum. + version('20210226', sha256='d9ffaed591c0491e311a44c2b246d9d81785f6c0b2747a7e32a783e522e18450') + version('20190529', sha256='c35a87d85055ae5fe41b68d4b4458f1fdbf80643890501eeaad35b134cb11a2d') + + # Licensing + license_required = True + license_comment = '#' + license_files = ['ampl.lic'] + license_url = 'https://ampl.com/resources/floating-licenses/installation/' + + resourceList = [ + # [version, name, destination, placement, url ,sha256sum] + ('20210226', 'amplapi', '', 'amplapi', 'file://{0}/amplapi-linux64.2.0.0.zip'.format(os.getcwd()), 'a4abe111f142b862f11fcd8700f964b688d5d2291e9e055f6e7adbd92b0e243a'), + ('20210226', 'amplide', '', 'amplide', 'file://{0}/amplide-linux64.3.5.tgz'.format(os.getcwd()), 'c2163896df672b71901d2e46cd5cf1c1c4f0451e478ef32d0971705aaf86d6ac'), + ('20190529', 'amplapi', '', 'amplapi', 'file://{0}/amplapi-linux64.2.0.0.zip'.format(os.getcwd()), 'a4abe111f142b862f11fcd8700f964b688d5d2291e9e055f6e7adbd92b0e243a'), + ('20190529', 'amplide', '', 'amplide', 'file://{0}/amplide-linux64.3.5.tgz'.format(os.getcwd()), 'c2163896df672b71901d2e46cd5cf1c1c4f0451e478ef32d0971705aaf86d6ac'), + ] + + for rsver, rsname, rsdest, rsplace, rsurl, rschecksum in resourceList: + resource(when='@{0}'.format(rsver), + name=rsname, + url=rsurl, + sha256=rschecksum, + destination=rsdest, + placement=rsplace + ) + + def url_for_version(self, version): + return "file://{0}/ampl.linux-intel64.{1}.tgz".format(os.getcwd(), version) + + def setup_run_environment(self, env): + env.prepend_path("PATH", self.prefix) + env.prepend_path("PATH", join_path(self.prefix, 'amplide')) + + def install(self, spec, prefix): + install_tree('.', prefix) + install_tree('amplapi', prefix) + install_tree('amplide', prefix) From 8126a13211bdbdb3a354d418f6a952106450845a Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 14 Jul 2021 12:58:53 -0700 Subject: [PATCH 111/289] Dask: 2021.06.2 (#24606) * Dask: 2021.06.2 Add the latest DASK release. * Apply suggestions from code review Co-authored-by: Sergey Kosukhin * Update py-distributed relation Co-authored-by: Sergey Kosukhin --- .../repos/builtin/packages/py-dask/package.py | 64 +++++++++++++------ .../packages/py-distributed/package.py | 1 + 2 files changed, 46 insertions(+), 19 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-dask/package.py b/var/spack/repos/builtin/packages/py-dask/package.py index 20900d20c31..4358b7c2580 100644 --- a/var/spack/repos/builtin/packages/py-dask/package.py +++ b/var/spack/repos/builtin/packages/py-dask/package.py @@ -14,6 +14,7 @@ class PyDask(PythonPackage): maintainers = ['skosukhin'] + version('2021.6.2', sha256='8588fcd1a42224b7cfcd2ebc8ad616734abb6b1a4517efd52d89c7dd66eb91f8') version('2020.12.0', sha256='43e745afd4b464e6c0113131e430a16dce6ac42460b06e24d799093d098f7ab0') version('2.16.0', sha256='2af5b0dcd48ce679ce0321cf91de623f4fe376262789b951fefa3c334002f350') version('1.2.2', sha256='5e7876bae2a01b355d1969b73aeafa23310febd8c353163910b73e93dc7e492c') @@ -30,57 +31,75 @@ class PyDask(PythonPackage): variant('delayed', default=True, description='Install requirements for dask.delayed (dask.imperative)') variant('yaml', default=True, description='Ensure support for YAML configuration files') + conflicts('~bag', when='@2021.3.1:') conflicts('+distributed', when='@:0.4.0,0.7.6:0.8.1') conflicts('+diagnostics', when='@:0.5.0') + conflicts('~delayed', when='@2021.3.1:') conflicts('+yaml', when='@:0.17.5') conflicts('~yaml', when='@2.17.1:') depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) depends_on('python@3.5:', type=('build', 'run'), when='@2.0.0:') depends_on('python@3.6:', type=('build', 'run'), when='@2.7.0:') + depends_on('python@3.7:', type=('build', 'run'), when='@2021.3.1:') depends_on('py-setuptools', type='build') + # Common requirements + depends_on('py-pyyaml', type=('build', 'run'), when='@2.17.1:') + depends_on('py-cloudpickle@1.1.1:', type=('build', 'run'), when='@2021.3.1:') + depends_on('py-fsspec@0.6.0:', type=('build', 'run'), when='@2021.3.1:') + depends_on('py-toolz@0.8.2:', type=('build', 'run'), when='@2021.3.1:') + depends_on('py-partd@0.3.10:', type=('build', 'run'), when='@2021.3.1:') + # Requirements for dask.array - depends_on('py-numpy@1.10.4:', type=('build', 'run'), when='+array') + depends_on('py-numpy', type=('build', 'run'), when='@:0.17.1 +array') + depends_on('py-numpy@1.10.4:', type=('build', 'run'), when='@0.17.2: +array') depends_on('py-numpy@1.11.0:', type=('build', 'run'), when='@0.17.3: +array') depends_on('py-numpy@1.13.0:', type=('build', 'run'), when='@1.2.1: +array') depends_on('py-numpy@1.15.1:', type=('build', 'run'), when='@2020.12.0: +array') + depends_on('py-numpy@1.16.0:', type=('build', 'run'), when='@2021.3.1: +array') - depends_on('py-toolz', type=('build', 'run'), when='+array') + depends_on('py-toolz', type=('build', 'run'), when='@:0.6.1 +array') depends_on('py-toolz@0.7.2:', type=('build', 'run'), when='@0.7.0: +array') depends_on('py-toolz@0.7.3:', type=('build', 'run'), when='@0.14.1: +array') - depends_on('py-toolz@0.8.2:', type=('build', 'run'), when='@2.13.0: +array') + # The dependency on py-toolz is non-optional starting version 2021.3.1 + depends_on('py-toolz@0.8.2:', type=('build', 'run'), when='@2.13.0:2021.3.0 +array') # Requirements for dask.bag depends_on('py-dill', type=('build', 'run'), when='@:0.7.5 +bag') depends_on('py-cloudpickle', type=('build', 'run'), when='@0.7.6: +bag') depends_on('py-cloudpickle@0.2.1:', type=('build', 'run'), when='@0.8.2: +bag') - depends_on('py-cloudpickle@0.2.2:', type=('build', 'run'), when='@2.13.0: +bag') + # The dependency on py-cloudpickle is non-optional starting version 2021.3.1 + depends_on('py-cloudpickle@0.2.2:', type=('build', 'run'), when='@2.13.0:2021.3.0 +bag') depends_on('py-fsspec@0.3.3:', type=('build', 'run'), when='@2.2.0: +bag') depends_on('py-fsspec@0.5.1:', type=('build', 'run'), when='@2.5.0: +bag') - depends_on('py-fsspec@0.6.0:', type=('build', 'run'), when='@2.8.0: +bag') + # The dependency on py-fsspec is non-optional starting version 2021.3.1 + depends_on('py-fsspec@0.6.0:', type=('build', 'run'), when='@2.8.0:2021.3.0 +bag') - depends_on('py-toolz', type=('build', 'run'), when='+bag') + depends_on('py-toolz', type=('build', 'run'), when='@:0.6.1 +bag') depends_on('py-toolz@0.7.2:', type=('build', 'run'), when='@0.7.0: +bag') depends_on('py-toolz@0.7.3:', type=('build', 'run'), when='@0.14.1: +bag') - depends_on('py-toolz@0.8.2:', type=('build', 'run'), when='@2.13.0: +bag') + # The dependency on py-toolz is non-optional starting version 2021.3.1 + depends_on('py-toolz@0.8.2:', type=('build', 'run'), when='@2.13.0:2021.3.0 +bag') - depends_on('py-partd', type=('build', 'run'), when='+bag') depends_on('py-partd@0.3.2:', type=('build', 'run'), when='@0.6.0: +bag') depends_on('py-partd@0.3.3:', type=('build', 'run'), when='@0.9.0: +bag') depends_on('py-partd@0.3.5:', type=('build', 'run'), when='@0.10.2: +bag') depends_on('py-partd@0.3.6:', type=('build', 'run'), when='@0.12.0: +bag') depends_on('py-partd@0.3.7:', type=('build', 'run'), when='@0.13.0: +bag') depends_on('py-partd@0.3.8:', type=('build', 'run'), when='@0.15.0: +bag') - depends_on('py-partd@0.3.10:', type=('build', 'run'), when='@2.0.0: +bag') + # The dependency on py-partd is non-optional starting version 2021.3.1 + depends_on('py-partd@0.3.10:', type=('build', 'run'), when='@2.0.0:2021.3.0 +bag') # Requirements for dask.dataframe - depends_on('py-numpy@1.10.4:', type=('build', 'run'), when='+dataframe') + depends_on('py-numpy', type=('build', 'run'), when='@:0.17.1 +dataframe') + depends_on('py-numpy@1.10.4:', type=('build', 'run'), when='@0.17.2: +dataframe') depends_on('py-numpy@1.11.0:', type=('build', 'run'), when='@0.17.3: +dataframe') depends_on('py-numpy@1.13.0:', type=('build', 'run'), when='@1.2.1: +dataframe') depends_on('py-numpy@1.15.1:', type=('build', 'run'), when='@2020.12.0: +dataframe') + depends_on('py-numpy@1.16.0:', type=('build', 'run'), when='@2021.3.1: +dataframe') depends_on('py-pandas@0.16.0:', type=('build', 'run'), when='+dataframe') depends_on('py-pandas@0.18.0:', type=('build', 'run'), when='@0.9.0: +dataframe') @@ -89,24 +108,27 @@ class PyDask(PythonPackage): depends_on('py-pandas@0.23.0:', type=('build', 'run'), when='@2.11.0: +dataframe') depends_on('py-pandas@0.25.0:', type=('build', 'run'), when='@2020.12.0: +dataframe') - depends_on('py-toolz', type=('build', 'run'), when='+dataframe') + depends_on('py-toolz', type=('build', 'run'), when='@:0.6.1 +dataframe') depends_on('py-toolz@0.7.2:', type=('build', 'run'), when='@0.7.0: +dataframe') depends_on('py-toolz@0.7.3:', type=('build', 'run'), when='@0.14.1: +dataframe') - depends_on('py-toolz@0.8.2:', type=('build', 'run'), when='@2.13.0: +dataframe') + # The dependency on py-toolz is non-optional starting version 2021.3.1 + depends_on('py-toolz@0.8.2:', type=('build', 'run'), when='@2.13.0:2021.3.0 +dataframe') - depends_on('py-partd', type=('build', 'run'), when='+dataframe') depends_on('py-partd@0.3.2:', type=('build', 'run'), when='@0.6.0: +dataframe') depends_on('py-partd@0.3.3:', type=('build', 'run'), when='@0.9.0: +dataframe') depends_on('py-partd@0.3.5:', type=('build', 'run'), when='@0.10.2: +dataframe') depends_on('py-partd@0.3.7:', type=('build', 'run'), when='@0.13.0: +dataframe') depends_on('py-partd@0.3.8:', type=('build', 'run'), when='@0.15.0: +dataframe') depends_on('py-partd@0.3.10:', type=('build', 'run'), when='@2.0.0: +dataframe') + # The dependency on py-partd is non-optional starting version 2021.3.1 + depends_on('py-partd@0.3.10:', type=('build', 'run'), when='@2.0.0:2021.3.0 +dataframe') depends_on('py-cloudpickle@0.2.1:', type=('build', 'run'), when='@0.8.2:2.6.0 +dataframe') depends_on('py-fsspec@0.3.3:', type=('build', 'run'), when='@2.2.0: +dataframe') depends_on('py-fsspec@0.5.1:', type=('build', 'run'), when='@2.5.0: +dataframe') - depends_on('py-fsspec@0.6.0:', type=('build', 'run'), when='@2.8.0: +dataframe') + # The dependency on py-fsspec is non-optional starting version 2021.3.1 + depends_on('py-fsspec@0.6.0:', type=('build', 'run'), when='@2.8.0:2021.3.0 +dataframe') # Requirements for dask.distributed depends_on('py-dill', type=('build', 'run'), when='@:0.7.5 +distributed') @@ -121,22 +143,26 @@ class PyDask(PythonPackage): depends_on('py-distributed@1.21:', type=('build', 'run'), when='@0.17.0: +distributed') depends_on('py-distributed@1.22:', type=('build', 'run'), when='@0.18.0: +distributed') depends_on('py-distributed@2.0:', type=('build', 'run'), when='@2.0.0: +distributed') + depends_on('py-distributed@2020.12.0:', type=('build', 'run'), when='@2020.12.0: +distributed') + depends_on('py-distributed@2021.6.2:', type=('build', 'run'), when='@2021.6.2: +distributed') # Requirements for dask.diagnostics - depends_on('py-bokeh', type=('build', 'run'), when='+diagnostics') depends_on('py-bokeh@1.0.0:', type=('build', 'run'), when='@2.0.0: +diagnostics') depends_on('py-bokeh@1.0.0:1.999,2.0.1:', type=('build', 'run'), when='@2.26.0: +diagnostics') # Requirements for dask.delayed - depends_on('py-cloudpickle@0.2.1:', type=('build', 'run'), when='@2,7.0: +delayed') - depends_on('py-cloudpickle@0.2.2:', type=('build', 'run'), when='@2.13.0: +delayed') + depends_on('py-cloudpickle@0.2.1:', type=('build', 'run'), when='@2.7.0: +delayed') + # The dependency on py-cloudpickle is non-optional starting version 2021.3.1 + depends_on('py-cloudpickle@0.2.2:', type=('build', 'run'), when='@2.13.0:2021.3.0 +delayed') depends_on('py-toolz@0.7.2:', type=('build', 'run'), when='@0.8.1: +delayed') depends_on('py-toolz@0.7.3:', type=('build', 'run'), when='@0.14.1: +delayed') - depends_on('py-toolz@0.8.2:', type=('build', 'run'), when='@2.13.0: +delayed') + # The dependency on py-toolz is non-optional starting version 2021.3.1 + depends_on('py-toolz@0.8.2:', type=('build', 'run'), when='@2.13.0:2021.3.0 +delayed') # Support for YAML configuration files - depends_on('py-pyyaml', type=('build', 'run'), when='+yaml') + # The dependency on py-pyyaml is non-optional starting version 2.17.1 + depends_on('py-pyyaml', type=('build', 'run'), when='@0.18.0:2.17.0 +yaml') @property def import_modules(self): diff --git a/var/spack/repos/builtin/packages/py-distributed/package.py b/var/spack/repos/builtin/packages/py-distributed/package.py index d70656dd424..aec2bd45833 100644 --- a/var/spack/repos/builtin/packages/py-distributed/package.py +++ b/var/spack/repos/builtin/packages/py-distributed/package.py @@ -22,6 +22,7 @@ class PyDistributed(PythonPackage): 'distributed.http.worker', 'distributed.diagnostics' ] + version('2021.6.2', sha256='d7d112a86ab049dcefa3b21fd1baea4212a2c03d22c24bd55ad38d21a7f5d148') version('2020.12.0', sha256='2a0b6acc921cd4e0143a7c4383cdcbed7defbc4bd9dc3aab0c7f1c45f14f80e1') version('2.10.0', sha256='2f8cca741a20f776929cbad3545f2df64cf60207fb21f774ef24aad6f6589e8b') version('1.28.1', sha256='3bd83f8b7eb5938af5f2be91ccff8984630713f36f8f66097e531a63f141c48a') From 1c07dd1adb044b6e399849cccf852a463ab1a30e Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:33:50 -0700 Subject: [PATCH 112/289] Update stand-alone tests to use test stage work directory (#24112) --- var/spack/repos/builtin/packages/dssp/package.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/dssp/package.py b/var/spack/repos/builtin/packages/dssp/package.py index 21284677148..b9487741df9 100644 --- a/var/spack/repos/builtin/packages/dssp/package.py +++ b/var/spack/repos/builtin/packages/dssp/package.py @@ -43,8 +43,13 @@ def edit(self): @run_after('install') def cache_test_sources(self): + """Save off the pdb sources for stand-alone testing.""" self.cache_extra_test_sources('pdb') def test(self): - pdb_path = join_path(self.install_test_root, 'pdb') - self.run_test('mkdssp', options=['1ALK.pdb', '1alk.dssp'], work_dir=pdb_path) + """Perform stand-alone/smoke test on installed package.""" + pdb_path = join_path(self.test_suite.current_test_cache_dir, 'pdb') + self.run_test('mkdssp', options=['1ALK.pdb', '1alk.dssp'], + purpose='test: calculating structure for example', + installed=True, + work_dir=pdb_path) From 29f10624bd398442ab3530215e0a73b362e0559d Mon Sep 17 00:00:00 2001 From: vucoda Date: Thu, 15 Jul 2021 07:00:32 +0930 Subject: [PATCH 113/289] Change url+checksums for libpng to official sourceforge archives (#23767) * Change url and checksums for libpng to official sourceforge archives * Update url scheme from http to https * switch to .xz archives Co-authored-by: Todd Gamblin --- var/spack/repos/builtin/packages/libpng/package.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/libpng/package.py b/var/spack/repos/builtin/packages/libpng/package.py index c9b7c601688..584688a3a86 100644 --- a/var/spack/repos/builtin/packages/libpng/package.py +++ b/var/spack/repos/builtin/packages/libpng/package.py @@ -10,10 +10,10 @@ class Libpng(AutotoolsPackage): """libpng is the official PNG reference library.""" homepage = "http://www.libpng.org/pub/png/libpng.html" - url = "https://github.com/glennrp/libpng/archive/v1.6.37.tar.gz" + url = "https://prdownloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz" git = "https://github.com/glennrp/libpng.git" - version('1.6.37', sha256='ca74a0dace179a8422187671aee97dd3892b53e168627145271cad5b5ac81307') + version('1.6.37', sha256='505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca') # From http://www.libpng.org/pub/png/libpng.html (2019-04-15) # libpng versions 1.6.36 and earlier have a use-after-free bug in the # simplified libpng API png_image_free(). It has been assigned ID @@ -21,7 +21,7 @@ class Libpng(AutotoolsPackage): # released on 15 April 2019. # Required for qt@3 - version('1.2.57', sha256='7f415186d38ca71c23058386d7cf5135c8beda821ee1beecdc2a7a26c0356615') + version('1.2.57', sha256='0f4620e11fa283fedafb474427c8e96bf149511a1804bdc47350963ae5cf54d8') depends_on('zlib@1.0.4:') # 1.2.5 or later recommended From 0a3f875b9561c3f1940c8a933892700e452e92e2 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 14 Jul 2021 23:00:44 -0400 Subject: [PATCH 114/289] boost: Run `b2 headers` after a git clone (#24889) --- var/spack/repos/builtin/packages/boost/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index d68db911624..411e20596ba 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -551,6 +551,10 @@ def install(self, spec, prefix): threading_opts = self.determine_b2_options(spec, b2_options) + # Create headers if building from a git checkout + if '@develop' in spec: + b2('headers', *b2_options) + b2('--clean', *b2_options) # In theory it could be done on one call but it fails on From fa4b9a6abc54eacd4d6859c972a0a81913d59657 Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Thu, 15 Jul 2021 14:06:41 +0200 Subject: [PATCH 115/289] simsipm: add new package (#24903) Co-authored-by: Massimiliano Culpo --- .../repos/builtin/packages/simsipm/package.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 var/spack/repos/builtin/packages/simsipm/package.py diff --git a/var/spack/repos/builtin/packages/simsipm/package.py b/var/spack/repos/builtin/packages/simsipm/package.py new file mode 100644 index 00000000000..9db1d87c82d --- /dev/null +++ b/var/spack/repos/builtin/packages/simsipm/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Simsipm(CMakePackage): + """SimSiPM is a simple and easy to use C++ library providing a set of + object-oriented tools with all the functionality needed to describe + and simulate Silicon PhotonMultipliers (SiPM) sensors.""" + + url = "https://github.com/EdoPro98/SimSiPM/archive/refs/tags/v1.2.4.tar.gz" + homepage = "https://github.com/EdoPro98/SimSiPM/" + git = "https://github.com/EdoPro98/SimSiPM.git" + + tags = ['hep'] + + maintainers = ['vvolkl'] + + version('1.2.4', sha256='1c633bebb19c490b5e6dfa5ada4a6bc7ec36348237c2626d57843a25af923211') + + variant('python', default=False, description="Build pybind11-based python bindings") + variant('openmp', default=False, description="Use OpenMP") + + extends('python', when='+python') + depends_on('python@3.6:', when="+python", type=('build', 'run')) + depends_on('py-pybind11', when="+python", type=('build', 'link')) + + def cmake_args(self): + args = [ + self.define_from_variant("SIPM_BUILD_PYTHON", "python"), + self.define_from_variant("SIPM_ENABLE_OPENMP", "openmp"), + self.define("SIPM_ENABLE_TEST", self.run_tests), + + ] + return args From f66571ffe197a3e1867dcfc2b1f765ab345b3959 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 15 Jul 2021 07:54:56 -0500 Subject: [PATCH 116/289] py-beniget: add v0.4.0, v0.2.3 (#24899) --- var/spack/repos/builtin/packages/py-beniget/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-beniget/package.py b/var/spack/repos/builtin/packages/py-beniget/package.py index aed35762a3d..a9a58e5ca0d 100644 --- a/var/spack/repos/builtin/packages/py-beniget/package.py +++ b/var/spack/repos/builtin/packages/py-beniget/package.py @@ -12,8 +12,12 @@ class PyBeniget(PythonPackage): homepage = "https://github.com/serge-sans-paille/beniget/" pypi = "beniget/beniget-0.3.0.tar.gz" + version('0.4.0', sha256='72bbd47b1ae93690f5fb2ad3902ce1ae61dcd868ce6cfbf33e9bad71f9ed8749') version('0.3.0', sha256='062c893be9cdf87c3144fb15041cce4d81c67107c1591952cd45fdce789a0ff1') + version('0.2.3', sha256='350422b0598c92fcc5f8bcaf77f2a62f6744fb8f2fb495b10a50176c1283639f') depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) depends_on('py-setuptools', type='build') - depends_on('py-gast@0.4.0:0.4.999', type=('build', 'run')) + depends_on('py-gast@0.5.0:0.5.999', when='@0.4.0:', type=('build', 'run')) + depends_on('py-gast@0.4.0:0.4.999', when='@0.3.0:0.3.999', type=('build', 'run')) + depends_on('py-gast@0.3.3:0.3.999', when='@:0.2.999', type=('build', 'run')) From 753fa4ed08ce6b676f3f5c2da37b46e6679d7e12 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 15 Jul 2021 07:56:09 -0500 Subject: [PATCH 117/289] py-gast: add v0.5.0 (#24898) --- var/spack/repos/builtin/packages/py-gast/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-gast/package.py b/var/spack/repos/builtin/packages/py-gast/package.py index 4ceb0eaa43d..12260e33c62 100644 --- a/var/spack/repos/builtin/packages/py-gast/package.py +++ b/var/spack/repos/builtin/packages/py-gast/package.py @@ -12,6 +12,7 @@ class PyGast(PythonPackage): homepage = "https://github.com/serge-sans-paille/gast" pypi = "gast/gast-0.3.2.tar.gz" + version('0.5.0', sha256='8109cbe7aa0f7bf7e4348379da05b8137ea1f059f073332c3c1cedd57db8541f') version('0.4.0', sha256='40feb7b8b8434785585ab224d1568b857edb18297e5a3047f1ba012bc83b42c1') version('0.3.3', sha256='b881ef288a49aa81440d2c5eb8aeefd4c2bb8993d5f50edae7413a85bfdb3b57') version('0.3.2', sha256='5c7617f1f6c8b8b426819642b16b9016727ddaecd16af9a07753e537eba8a3a5') From fd55d627a7752fbe54b9ee1550979e7c8d246484 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Thu, 15 Jul 2021 15:27:13 +0200 Subject: [PATCH 118/289] archspec: added support for arm compiler on graviton2 (#24904) --- lib/spack/external/__init__.py | 2 +- .../external/archspec/json/cpu/microarchitectures.json | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/spack/external/__init__.py b/lib/spack/external/__init__.py index 8adc4e12714..7ae506a46b3 100644 --- a/lib/spack/external/__init__.py +++ b/lib/spack/external/__init__.py @@ -11,7 +11,7 @@ * Homepage: https://pypi.python.org/pypi/archspec * Usage: Labeling, comparison and detection of microarchitectures -* Version: 0.1.2 (commit 26dec9d47e509daf8c970de4c89da200da52ad20) +* Version: 0.1.2 (commit 4dbf253daf37e4a008e4beb6489f347b4a35aed4) argparse -------- diff --git a/lib/spack/external/archspec/json/cpu/microarchitectures.json b/lib/spack/external/archspec/json/cpu/microarchitectures.json index e34bf9e1791..40f59bfd9e7 100644 --- a/lib/spack/external/archspec/json/cpu/microarchitectures.json +++ b/lib/spack/external/archspec/json/cpu/microarchitectures.json @@ -1942,6 +1942,12 @@ "versions": "5:", "flags" : "-march=armv8.2-a+fp16+rcpc+dotprod+crypto" } + ], + "arm" : [ + { + "versions": "20:", + "flags" : "-march=armv8.2-a+fp16+rcpc+dotprod+crypto" + } ] } }, From e96ba16555dd6bb3595829773f91a00b0155b9bf Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Thu, 15 Jul 2021 11:44:42 -0700 Subject: [PATCH 119/289] ci: build trilinos with all variants on (#24908) --- .../gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml | 2 +- share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml index ee725255d6d..fc0c5ef68e2 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml @@ -283,7 +283,7 @@ spack: # - sz # - tasmanian # - tau - # - trilinos + #- trilinos@13.0.1 +amesos +amesos2 +anasazi +aztec +belos +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +teuchos +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long # - turbine # - umap # - unifyfs@0.9.1 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 4a8fedbc352..790bb341bb1 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -284,8 +284,7 @@ spack: - sz - tasmanian - tau - - trilinos - - trilinos +nox +superlu-dist + - trilinos@13.0.1 +amesos +amesos2 +anasazi +aztec +belos +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +teuchos +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long - turbine - umap - unifyfs@0.9.1 From 64f31c457923c7e4cb00fe28d83431e67761d56e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Fri, 16 Jul 2021 13:47:27 +0200 Subject: [PATCH 120/289] Added missing Plumed 2.5-2.7 versions to Gromacs package (#24912) * Added missing Plumed 2.5-2.7 releases * Added missing Plumed 2.5-2.7 dependencies * Merged version ranges * Simplified version ranges * Deduplicated comment --- .../repos/builtin/packages/gromacs/package.py | 54 +++++++++++++++---- .../repos/builtin/packages/plumed/package.py | 8 ++- 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 30c2acd61e5..5b0a87a66e5 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -94,17 +94,53 @@ class Gromacs(CMakePackage): description='Enables cycle subcounters') depends_on('mpi', when='+mpi') - # define matching plumed versions - depends_on('plumed@2.6.0:2.6.9+mpi', when='@2020.2+plumed+mpi') - depends_on('plumed@2.6.0:2.6.9~mpi', when='@2020.2+plumed~mpi') - depends_on('plumed@2.6.0:2.6.9+mpi', when='@2019.6+plumed+mpi') - depends_on('plumed@2.6.0:2.6.9~mpi', when='@2019.6+plumed~mpi') - depends_on('plumed@2.5.0:2.5.9+mpi', when='@2019.4+plumed+mpi') - depends_on('plumed@2.5.0:2.5.9~mpi', when='@2019.4+plumed~mpi') - depends_on('plumed@2.5.0:2.5.9+mpi', when='@2018.6+plumed+mpi') - depends_on('plumed@2.5.0:2.5.9~mpi', when='@2018.6+plumed~mpi') + + # Plumed 2.7.1 needs Gromacs 2021, 2020.5, 2019.6 + # Plumed 2.7.0 needs Gromacs 2020.4, 2019.6 + # Plumed 2.6.3 needs Gromacs 2020.4, 2019.6, 2018.8 + # Plumed 2.6.2 needs Gromacs 2020.4, 2019.6, 2018.8 + # Plumed 2.6.1 needs Gromacs 2020.2, 2019.6, 2018.8 + # Plumed 2.6.0 needs Gromacs 2019.4, 2018.8 + # Plumed 2.5.7 needs Gromacs 2019.4, 2018.8, 2016.6 + # Plumed 2.5.6 needs Gromacs 2019.4, 2018.8, 2016.6 + # Plumed 2.5.5 needs Gromacs 2019.4, 2018.8, 2016.6 + # Plumed 2.5.4 needs Gromacs 2019.4, 2018.8, 2016.6 + # Plumed 2.5.3 needs Gromacs 2019.4, 2018.8, 2016.6 + # Plumed 2.5.2 needs Gromacs 2019.2, 2018.6, 2016.6 + # Plumed 2.5.1 needs Gromacs 2018.6, 2016.6 + # Plumed 2.5.0 needs Gromacs 2018.4, 2016.5 + + # Above dependencies can be verified, and new versions added, by going to + # https://github.com/plumed/plumed2/tree/v2.7.1/patches + # and switching tags. + depends_on('plumed+mpi', when='+plumed+mpi') depends_on('plumed~mpi', when='+plumed~mpi') + depends_on('plumed@2.7.1+mpi', when='@2021+plumed+mpi') + depends_on('plumed@2.7.1~mpi', when='@2021+plumed~mpi') + depends_on('plumed@2.7.1+mpi', when='@2020.5+plumed+mpi') + depends_on('plumed@2.7.1~mpi', when='@2020.5+plumed~mpi') + depends_on('plumed@2.6.2:2.7.0+mpi', when='@2020.4+plumed+mpi') + depends_on('plumed@2.6.2:2.7.0~mpi', when='@2020.4+plumed~mpi') + depends_on('plumed@2.6.1+mpi', when='@2020.2+plumed+mpi') + depends_on('plumed@2.6.1~mpi', when='@2020.2+plumed~mpi') + depends_on('plumed@2.6.1:2.7.1+mpi', when='@2019.6+plumed+mpi') + depends_on('plumed@2.6.1:2.7.1~mpi', when='@2019.6+plumed~mpi') + depends_on('plumed@2.5.3:2.6.0+mpi', when='@2019.4+plumed+mpi') + depends_on('plumed@2.5.3:2.6.0~mpi', when='@2019.4+plumed~mpi') + depends_on('plumed@2.5.2+mpi', when='@2019.2+plumed+mpi') + depends_on('plumed@2.5.2~mpi', when='@2019.2+plumed~mpi') + depends_on('plumed@2.5.3:2.6.99+mpi', when='@2018.8+plumed+mpi') + depends_on('plumed@2.5.3:2.6.99~mpi', when='@2018.8+plumed~mpi') + depends_on('plumed@2.5.1:2.5.2+mpi', when='@2018.6+plumed+mpi') + depends_on('plumed@2.5.1:2.5.2~mpi', when='@2018.6+plumed~mpi') + depends_on('plumed@2.5.0+mpi', when='@2018.4+plumed+mpi') + depends_on('plumed@2.5.0~mpi', when='@2018.4+plumed~mpi') + depends_on('plumed@2.5.1:2.5.99+mpi', when='@2016.6+plumed+mpi') + depends_on('plumed@2.5.1:2.5.99~mpi', when='@2016.6+plumed~mpi') + depends_on('plumed@2.5.0+mpi', when='@2016.5+plumed+mpi') + depends_on('plumed@2.5.0~mpi', when='@2016.5+plumed~mpi') + depends_on('fftw-api@3') depends_on('cmake@2.8.8:3.99.99', type='build') depends_on('cmake@3.4.3:3.99.99', type='build', when='@2018:') diff --git a/var/spack/repos/builtin/packages/plumed/package.py b/var/spack/repos/builtin/packages/plumed/package.py index c6be801b065..78c3c30c9c1 100644 --- a/var/spack/repos/builtin/packages/plumed/package.py +++ b/var/spack/repos/builtin/packages/plumed/package.py @@ -21,14 +21,18 @@ class Plumed(AutotoolsPackage): and C/C++ codes. """ homepage = 'http://www.plumed.org/' - url = 'https://github.com/plumed/plumed2/archive/v2.5.3.tar.gz' + url = 'https://github.com/plumed/plumed2/archive/v2.6.3.tar.gz' git = 'https://github.com/plumed/plumed2.git' version('master', branch='master') + version('2.7.1', sha256='cb8b5735d8dd61980fa6441f3dde3f33544240ae4177da0f529fb5abb355cd4a') version('2.7.0', sha256='14450ea566c25ac9bf71fd77bb9c0c95e9038462b5739c73a515be82e2011cd6') - version('2.6.2', preferred=True, sha256='bbc2ef0cb08d404513b8b737c72333b6656389e15effd6a0f9ace2a5758c9a4a') + version('2.6.3', preferred=True, sha256='d05b9e4a4c1329fc932d5bdd04f20419be230f98159bdc012a91716461ab4a2f') + version('2.6.2', sha256='bbc2ef0cb08d404513b8b737c72333b6656389e15effd6a0f9ace2a5758c9a4a') version('2.6.1', sha256='c1b3c397b2d971140aa240dde50e48a04ce78e3dedb02b6dca80fa53f8026e4e') version('2.6.0', sha256='3d57ae460607a49547ef38a52c4ac93493a3966857c352280a9c05f5dcdb1820') + version('2.5.7', sha256='aa10d2879c3edeaef9d5a530fe8b05f67ecfbec2e9423e0f95701d0bc54826c7') + version('2.5.6', sha256='1bc29b0274196fb553cdf7ba8ecb7a93a91d60a920d99863edbcd536d618ce8c') version('2.5.5', sha256='70faa9ff1938e286dc388cb793b39840953e5646855b684f48df1bc864b737e8') version('2.5.4', sha256='a1647e598191f261e75d06351e607475d395af481315052a4c28563ac9989a7f') version('2.5.3', sha256='543288be667dc4201fc461ecd2dd4878ddfbeac682d0c021c99ea8e501c7c9dc') From c37df94932260fe3e5f22381af03587662569f7e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 16 Jul 2021 10:28:00 -0500 Subject: [PATCH 121/289] Python: query distutils to find site-packages directory (#24095) Third-party Python libraries may be installed in one of several directories: 1. `lib/pythonX.Y/site-packages` for Spack-installed Python 2. `lib64/pythonX.Y/site-packages` for system Python on RHEL/CentOS/Fedora 3. `lib/pythonX/dist-packages` for system Python on Debian/Ubuntu Previously, Spack packages were hard-coded to use the (1). Now, we query the Python installation itself and ask it which to use. Ever since #21446 this is how we've been determining where to install Python libraries anyway. Note: there are still many packages that are hard-coded to use (1). I can change them in this PR, but I don't have the bandwidth to test all of them. * Python: handle dist-packages and site-packages * Query Python to find site-packages directory * Add try-except statements for when distutils isn't installed * Catch more errors * Fix root directory used in import tests * Rely on site_packages_dir property --- lib/spack/spack/bootstrap.py | 4 - lib/spack/spack/build_systems/python.py | 43 +++-- lib/spack/spack/build_systems/sip.py | 28 ++- .../repos/builtin/packages/python/package.py | 160 +++++++++++++----- 4 files changed, 145 insertions(+), 90 deletions(-) diff --git a/lib/spack/spack/bootstrap.py b/lib/spack/spack/bootstrap.py index 96f11b631d1..896c1cad4e0 100644 --- a/lib/spack/spack/bootstrap.py +++ b/lib/spack/spack/bootstrap.py @@ -95,10 +95,8 @@ def make_module_available(module, spec=None, install=False): # TODO: make sure run-environment is appropriate module_path = os.path.join(ispec.prefix, ispec['python'].package.site_packages_dir) - module_path_64 = module_path.replace('/lib/', '/lib64/') try: sys.path.append(module_path) - sys.path.append(module_path_64) __import__(module) return except ImportError: @@ -122,10 +120,8 @@ def _raise_error(module_name, module_spec): module_path = os.path.join(spec.prefix, spec['python'].package.site_packages_dir) - module_path_64 = module_path.replace('/lib/', '/lib64/') try: sys.path.append(module_path) - sys.path.append(module_path_64) __import__(module) return except ImportError: diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index b4f55ab7074..27b1d4a10c4 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -127,24 +127,22 @@ def import_modules(self): list: list of strings of module names """ modules = [] + root = self.spec['python'].package.get_python_lib(prefix=self.prefix) - # Python libraries may be installed in lib or lib64 - # See issues #18520 and #17126 - for lib in ['lib', 'lib64']: - root = os.path.join(self.prefix, lib, 'python{0}'.format( - self.spec['python'].version.up_to(2)), 'site-packages') - # Some Python libraries are packages: collections of modules - # distributed in directories containing __init__.py files - for path in find(root, '__init__.py', recursive=True): - modules.append(path.replace(root + os.sep, '', 1).replace( - os.sep + '__init__.py', '').replace('/', '.')) - # Some Python libraries are modules: individual *.py files - # found in the site-packages directory - for path in find(root, '*.py', recursive=False): - modules.append(path.replace(root + os.sep, '', 1).replace( - '.py', '').replace('/', '.')) + # Some Python libraries are packages: collections of modules + # distributed in directories containing __init__.py files + for path in find(root, '__init__.py', recursive=True): + modules.append(path.replace(root + os.sep, '', 1).replace( + os.sep + '__init__.py', '').replace('/', '.')) + + # Some Python libraries are modules: individual *.py files + # found in the site-packages directory + for path in find(root, '*.py', recursive=False): + modules.append(path.replace(root + os.sep, '', 1).replace( + '.py', '').replace('/', '.')) tty.debug('Detected the following modules: {0}'.format(modules)) + return modules def setup_file(self): @@ -254,15 +252,12 @@ def install_args(self, spec, prefix): # Get all relative paths since we set the root to `prefix` # We query the python with which these will be used for the lib and inc # directories. This ensures we use `lib`/`lib64` as expected by python. - python = spec['python'].package.command - command_start = 'print(distutils.sysconfig.' - commands = ';'.join([ - 'import distutils.sysconfig', - command_start + 'get_python_lib(plat_specific=False, prefix=""))', - command_start + 'get_python_lib(plat_specific=True, prefix=""))', - command_start + 'get_python_inc(plat_specific=True, prefix=""))']) - pure_site_packages_dir, plat_site_packages_dir, inc_dir = python( - '-c', commands, output=str, error=str).strip().split('\n') + pure_site_packages_dir = spec['python'].package.get_python_lib( + plat_specific=False, prefix='') + plat_site_packages_dir = spec['python'].package.get_python_lib( + plat_specific=True, prefix='') + inc_dir = spec['python'].package.get_python_inc( + plat_specific=True, prefix='') args += ['--root=%s' % prefix, '--install-purelib=%s' % pure_site_packages_dir, diff --git a/lib/spack/spack/build_systems/sip.py b/lib/spack/spack/build_systems/sip.py index c32c46ec467..744989e2d6e 100644 --- a/lib/spack/spack/build_systems/sip.py +++ b/lib/spack/spack/build_systems/sip.py @@ -64,24 +64,22 @@ def import_modules(self): list: list of strings of module names """ modules = [] + root = self.spec['python'].package.get_python_lib(prefix=self.prefix) - # Python libraries may be installed in lib or lib64 - # See issues #18520 and #17126 - for lib in ['lib', 'lib64']: - root = os.path.join(self.prefix, lib, 'python{0}'.format( - self.spec['python'].version.up_to(2)), 'site-packages') - # Some Python libraries are packages: collections of modules - # distributed in directories containing __init__.py files - for path in find(root, '__init__.py', recursive=True): - modules.append(path.replace(root + os.sep, '', 1).replace( - os.sep + '__init__.py', '').replace('/', '.')) - # Some Python libraries are modules: individual *.py files - # found in the site-packages directory - for path in find(root, '*.py', recursive=False): - modules.append(path.replace(root + os.sep, '', 1).replace( - '.py', '').replace('/', '.')) + # Some Python libraries are packages: collections of modules + # distributed in directories containing __init__.py files + for path in find(root, '__init__.py', recursive=True): + modules.append(path.replace(root + os.sep, '', 1).replace( + os.sep + '__init__.py', '').replace('/', '.')) + + # Some Python libraries are modules: individual *.py files + # found in the site-packages directory + for path in find(root, '*.py', recursive=False): + modules.append(path.replace(root + os.sep, '', 1).replace( + '.py', '').replace('/', '.')) tty.debug('Detected the following modules: {0}'.format(modules)) + return modules def python(self, *args, **kwargs): diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 62805e12a1f..61f42aaad39 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -711,23 +711,53 @@ def get_makefile_filename(self): return self.command('-c', cmd, output=str).strip() - def get_python_inc(self): + def get_python_inc(self, plat_specific=False, prefix=None): """Return the directory for either the general or platform-dependent C include files. Wrapper around ``distutils.sysconfig.get_python_inc()``. + + Parameters: + plat_specific (bool): if true, the platform-dependent include directory + is returned, else the platform-independent directory is returned + prefix (str): prefix to use instead of ``distutils.sysconfig.PREFIX`` + + Returns: + str: include files directory """ + # Wrap strings in quotes + if prefix is not None: + prefix = '"{0}"'.format(prefix) + + args = 'plat_specific={0}, prefix={1}'.format(plat_specific, prefix) cmd = 'from distutils.sysconfig import get_python_inc; ' - cmd += self.print_string('get_python_inc()') + cmd += self.print_string('get_python_inc({0})'.format(args)) return self.command('-c', cmd, output=str).strip() - def get_python_lib(self): + def get_python_lib(self, plat_specific=False, standard_lib=False, prefix=None): """Return the directory for either the general or platform-dependent - library installation. Wrapper around - ``distutils.sysconfig.get_python_lib()``.""" + library installation. Wrapper around ``distutils.sysconfig.get_python_lib()``. + + Parameters: + plat_specific (bool): if true, the platform-dependent library directory + is returned, else the platform-independent directory is returned + standard_lib (bool): if true, the directory for the standard library is + returned rather than the directory for the installation of + third-party extensions + prefix (str): prefix to use instead of ``distutils.sysconfig.PREFIX`` + + Returns: + str: library installation directory + """ + # Wrap strings in quotes + if prefix is not None: + prefix = '"{0}"'.format(prefix) + + args = 'plat_specific={0}, standard_lib={1}, prefix={2}'.format( + plat_specific, standard_lib, prefix) cmd = 'from distutils.sysconfig import get_python_lib; ' - cmd += self.print_string('get_python_lib()') + cmd += self.print_string('get_python_lib({0})'.format(args)) return self.command('-c', cmd, output=str).strip() @@ -827,16 +857,71 @@ def headers(self): return headers @property - def python_lib_dir(self): - return join_path('lib', 'python{0}'.format(self.version.up_to(2))) + def python_include_dir(self): + """Directory for the include files. + + On most systems, and for Spack-installed Python, this will look like: + + ``include/pythonX.Y`` + + However, some systems append a ``m`` to the end of this path. + + Returns: + str: include files directory + """ + try: + return self.get_python_inc(prefix='') + except (ProcessError, RuntimeError): + return os.path.join('include', 'python{0}'.format(self.version.up_to(2))) @property - def python_include_dir(self): - return join_path('include', 'python{0}'.format(self.version.up_to(2))) + def python_lib_dir(self): + """Directory for the standard library. + + On most systems, and for Spack-installed Python, this will look like: + + ``lib/pythonX.Y`` + + On RHEL/CentOS/Fedora, when using the system Python, this will look like: + + ``lib64/pythonX.Y`` + + On Debian/Ubuntu, when using the system Python, this will look like: + + ``lib/pythonX`` + + Returns: + str: standard library directory + """ + try: + return self.get_python_lib(standard_lib=True, prefix='') + except (ProcessError, RuntimeError): + return os.path.join('lib', 'python{0}'.format(self.version.up_to(2))) @property def site_packages_dir(self): - return join_path(self.python_lib_dir, 'site-packages') + """Directory where third-party extensions should be installed. + + On most systems, and for Spack-installed Python, this will look like: + + ``lib/pythonX.Y/site-packages`` + + On RHEL/CentOS/Fedora, when using the system Python, this will look like: + + ``lib64/pythonX.Y/site-packages`` + + On Debian/Ubuntu, when using the system Python, this will look like: + + ``lib/pythonX/dist-packages`` + + Returns: + str: site-packages directory + """ + try: + return self.get_python_lib(prefix='') + except (ProcessError, RuntimeError): + return os.path.join( + 'lib', 'python{0}'.format(self.version.up_to(2)), 'site-packages') @property def easy_install_file(self): @@ -848,8 +933,8 @@ def setup_run_environment(self, env): def setup_dependent_build_environment(self, env, dependent_spec): """Set PYTHONPATH to include the site-packages directory for the - extension and any other python extensions it depends on.""" - + extension and any other python extensions it depends on. + """ # If we set PYTHONHOME, we must also ensure that the corresponding # python is found in the build environment. This to prevent cases # where a system provided python is run against the standard libraries @@ -860,18 +945,10 @@ def setup_dependent_build_environment(self, env, dependent_spec): if not is_system_path(path): env.prepend_path('PATH', path) - python_paths = [] - for d in dependent_spec.traverse(deptype=('build', 'run', 'test')): + for d in dependent_spec.traverse(deptype=('build', 'run', 'test'), root=True): if d.package.extends(self.spec): - # Python libraries may be installed in lib or lib64 - # See issues #18520 and #17126 - for lib in ['lib', 'lib64']: - python_paths.append(join_path( - d.prefix, lib, 'python' + str(self.version.up_to(2)), - 'site-packages')) - - pythonpath = ':'.join(python_paths) - env.set('PYTHONPATH', pythonpath) + env.prepend_path('PYTHONPATH', join_path( + d.prefix, self.site_packages_dir)) # We need to make sure that the extensions are compiled and linked with # the Spack wrapper. Paths to the executables that are used for these @@ -929,27 +1006,16 @@ def setup_dependent_build_environment(self, env, dependent_spec): env.set(link_var, new_link) def setup_dependent_run_environment(self, env, dependent_spec): - python_paths = [] - for d in dependent_spec.traverse(deptype='run'): + """Set PYTHONPATH to include the site-packages directory for the + extension and any other python extensions it depends on. + """ + for d in dependent_spec.traverse(deptype=('run'), root=True): if d.package.extends(self.spec): - # Python libraries may be installed in lib or lib64 - # See issues #18520 and #17126 - for lib in ['lib', 'lib64']: - root = join_path( - d.prefix, lib, 'python' + str(self.version.up_to(2)), - 'site-packages') - if os.path.exists(root): - python_paths.append(root) - - pythonpath = ':'.join(python_paths) - env.prepend_path('PYTHONPATH', pythonpath) + env.prepend_path('PYTHONPATH', join_path( + d.prefix, self.site_packages_dir)) def setup_dependent_package(self, module, dependent_spec): - """Called before python modules' install() methods. - - In most cases, extensions will only need to have one line:: - - setup_py('install', '--prefix={0}'.format(prefix))""" + """Called before python modules' install() methods.""" module.python = self.command module.setup_py = Executable( @@ -978,17 +1044,17 @@ def python_ignore(self, ext_pkg, args): ignore_arg = args.get('ignore', lambda f: False) # Always ignore easy-install.pth, as it needs to be merged. - patterns = [r'site-packages/easy-install\.pth$'] + patterns = [r'(site|dist)-packages/easy-install\.pth$'] # Ignore pieces of setuptools installed by other packages. # Must include directory name or it will remove all site*.py files. if ext_pkg.name != 'py-setuptools': patterns.extend([ r'bin/easy_install[^/]*$', - r'site-packages/setuptools[^/]*\.egg$', - r'site-packages/setuptools\.pth$', - r'site-packages/site[^/]*\.pyc?$', - r'site-packages/__pycache__/site[^/]*\.pyc?$' + r'(site|dist)-packages/setuptools[^/]*\.egg$', + r'(site|dist)-packages/setuptools\.pth$', + r'(site|dist)-packages/site[^/]*\.pyc?$', + r'(site|dist)-packages/__pycache__/site[^/]*\.pyc?$' ]) if ext_pkg.name != 'py-pygments': patterns.append(r'bin/pygmentize$') From b8afc0fd291a9e5f414e618965ad976f050fa6dc Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 3 Jul 2021 17:10:13 -0500 Subject: [PATCH 122/289] API Docs: fix broken reference targets --- lib/spack/docs/Makefile | 2 +- lib/spack/docs/build_systems/cmakepackage.rst | 4 +- lib/spack/docs/conf.py | 34 +++- lib/spack/docs/developer_guide.rst | 123 +++++++------- lib/spack/docs/packaging_guide.rst | 156 +++++++++--------- lib/spack/llnl/util/argparsewriter.py | 2 +- lib/spack/llnl/util/filesystem.py | 44 ++--- lib/spack/llnl/util/lang.py | 6 +- lib/spack/llnl/util/lock.py | 26 ++- lib/spack/llnl/util/tty/colify.py | 24 ++- lib/spack/spack/architecture.py | 4 +- lib/spack/spack/binary_distribution.py | 18 +- lib/spack/spack/bootstrap.py | 2 +- lib/spack/spack/build_environment.py | 32 ++-- lib/spack/spack/build_systems/autotools.py | 21 +-- lib/spack/spack/build_systems/cmake.py | 2 +- lib/spack/spack/build_systems/intel.py | 2 +- lib/spack/spack/cmd/__init__.py | 27 ++- lib/spack/spack/cmd/analyze.py | 4 +- lib/spack/spack/cmd/buildcache.py | 7 +- lib/spack/spack/cmd/create.py | 8 +- lib/spack/spack/cmd/dependents.py | 2 +- lib/spack/spack/cmd/install.py | 4 +- lib/spack/spack/cmd/uninstall.py | 29 ++-- lib/spack/spack/cmd/url.py | 2 +- lib/spack/spack/compilers/__init__.py | 16 +- lib/spack/spack/config.py | 8 +- lib/spack/spack/database.py | 47 +++--- lib/spack/spack/directives.py | 26 +-- lib/spack/spack/environment.py | 27 +-- lib/spack/spack/fetch_strategy.py | 7 +- lib/spack/spack/install_test.py | 2 +- lib/spack/spack/installer.py | 94 ++++++----- lib/spack/spack/main.py | 6 +- lib/spack/spack/mixins.py | 3 +- lib/spack/spack/modules/lmod.py | 2 +- lib/spack/spack/modules/tcl.py | 2 +- lib/spack/spack/package.py | 50 +++--- lib/spack/spack/patch.py | 2 +- lib/spack/spack/relocate.py | 2 +- lib/spack/spack/solver/asp.py | 10 +- lib/spack/spack/spec.py | 15 +- lib/spack/spack/stage.py | 7 +- lib/spack/spack/test/installer.py | 10 +- lib/spack/spack/url.py | 12 +- lib/spack/spack/user_environment.py | 2 +- lib/spack/spack/util/editor.py | 2 +- lib/spack/spack/util/environment.py | 10 +- lib/spack/spack/util/executable.py | 2 +- lib/spack/spack/util/imp/imp_importer.py | 4 +- .../spack/util/imp/importlib_importer.py | 4 +- lib/spack/spack/util/log_parse.py | 4 +- lib/spack/spack/util/package_hash.py | 4 +- lib/spack/spack/util/pattern.py | 2 +- lib/spack/spack/util/string.py | 2 +- lib/spack/spack/util/web.py | 2 +- lib/spack/spack/variant.py | 10 +- 57 files changed, 510 insertions(+), 471 deletions(-) diff --git a/lib/spack/docs/Makefile b/lib/spack/docs/Makefile index 1a8c13e8fb4..d86faa6ad46 100644 --- a/lib/spack/docs/Makefile +++ b/lib/spack/docs/Makefile @@ -2,7 +2,7 @@ # # You can set these variables from the command line. -SPHINXOPTS = -W +SPHINXOPTS = -W --keep-going SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build diff --git a/lib/spack/docs/build_systems/cmakepackage.rst b/lib/spack/docs/build_systems/cmakepackage.rst index a3282514e87..3c3c96f92c2 100644 --- a/lib/spack/docs/build_systems/cmakepackage.rst +++ b/lib/spack/docs/build_systems/cmakepackage.rst @@ -130,8 +130,8 @@ Adding flags to cmake To add additional flags to the ``cmake`` call, simply override the ``cmake_args`` function. The following example defines values for the flags ``WHATEVER``, ``ENABLE_BROKEN_FEATURE``, ``DETECT_HDF5``, and ``THREADS`` with -and without the :py:meth:`~.CMakePackage.define` and -:py:meth:`~.CMakePackage.define_from_variant` helper functions: +and without the :meth:`~spack.build_systems.cmake.CMakePackage.define` and +:meth:`~spack.build_systems.cmake.CMakePackage.define_from_variant` helper functions: .. code-block:: python diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index 38d75747e36..20a1ba86c54 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -101,11 +101,14 @@ def setup(sphinx): # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', - 'sphinx.ext.graphviz', - 'sphinx.ext.napoleon', - 'sphinx.ext.todo', - 'sphinxcontrib.programoutput'] +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.graphviz', + 'sphinx.ext.intersphinx', + 'sphinx.ext.napoleon', + 'sphinx.ext.todo', + 'sphinxcontrib.programoutput', +] # Set default graphviz options graphviz_dot_args = [ @@ -164,6 +167,19 @@ def setup(sphinx): # directories to ignore when looking for source files. exclude_patterns = ['_build', '_spack_root', '.spack-env'] +nitpicky = True +nitpick_ignore = [ + # Python classes that intersphinx is unable to resolve + ('py:class', 'argparse.HelpFormatter'), + ('py:class', 'contextlib.contextmanager'), + ('py:class', 'module'), + ('py:class', '_io.BufferedReader'), + ('py:class', 'unittest.case.TestCase'), + ('py:class', '_frozen_importlib_external.SourceFileLoader'), + # Spack classes that are private and we don't want to expose + ('py:class', 'spack.provider_index._IndexBase'), +] + # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None @@ -358,3 +374,11 @@ class SpackStyle(DefaultStyle): # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' + + +# -- Extension configuration ------------------------------------------------- + +# sphinx.ext.intersphinx +intersphinx_mapping = { + "python": ("https://docs.python.org/3", None), +} diff --git a/lib/spack/docs/developer_guide.rst b/lib/spack/docs/developer_guide.rst index fe67b909504..31311e87f70 100644 --- a/lib/spack/docs/developer_guide.rst +++ b/lib/spack/docs/developer_guide.rst @@ -108,9 +108,9 @@ with a high level view of Spack's directory structure: spack/ <- spack module; contains Python code analyzers/ <- modules to run analysis on installed packages - build_systems/ <- modules for different build systems + build_systems/ <- modules for different build systems cmd/ <- each file in here is a spack subcommand - compilers/ <- compiler description files + compilers/ <- compiler description files container/ <- module for spack containerize hooks/ <- hook modules to run at different points modules/ <- modules for lmod, tcl, etc. @@ -151,24 +151,22 @@ Package-related modules ^^^^^^^^^^^^^^^^^^^^^^^ :mod:`spack.package` - Contains the :class:`Package ` class, which + Contains the :class:`~spack.package.Package` class, which is the superclass for all packages in Spack. Methods on ``Package`` implement all phases of the :ref:`package lifecycle ` and manage the build process. -:mod:`spack.packages` - Contains all of the packages in Spack and methods for managing them. - Functions like :func:`packages.get ` and - :func:`class_name_for_package_name - ` handle mapping package module - names to class names and dynamically instantiating packages by name - from module files. +:mod:`spack.util.naming` + Contains functions for mapping between Spack package names, + Python module names, and Python class names. Functions like + :func:`~spack.util.naming.mod_to_class` handle mapping package + module names to class names. -:mod:`spack.relations` - *Relations* are relationships between packages, like - :func:`depends_on ` and :func:`provides - `. See :ref:`dependencies` and - :ref:`virtual-dependencies`. +:mod:`spack.directives` + *Directives* are functions that can be called inside a package definition + to modify the package, like :func:`~spack.directives.depends_on` + and :func:`~spack.directives.provides`. See :ref:`dependencies` + and :ref:`virtual-dependencies`. :mod:`spack.multimethod` Implementation of the :func:`@when ` @@ -180,31 +178,27 @@ Spec-related modules ^^^^^^^^^^^^^^^^^^^^ :mod:`spack.spec` - Contains :class:`Spec ` and :class:`SpecParser - `. Also implements most of the logic for - normalization and concretization of specs. + Contains :class:`~spack.spec.Spec` and :class:`~spack.spec.SpecParser`. + Also implements most of the logic for normalization and concretization + of specs. :mod:`spack.parse` Contains some base classes for implementing simple recursive descent - parsers: :class:`Parser ` and :class:`Lexer - `. Used by :class:`SpecParser - `. + parsers: :class:`~spack.parse.Parser` and :class:`~spack.parse.Lexer`. + Used by :class:`~spack.spec.SpecParser`. :mod:`spack.concretize` - Contains :class:`DefaultConcretizer - ` implementation, which allows - site administrators to change Spack's :ref:`concretization-policies`. + Contains :class:`~spack.concretize.Concretizer` implementation, + which allows site administrators to change Spack's :ref:`concretization-policies`. :mod:`spack.version` - Implements a simple :class:`Version ` class - with simple comparison semantics. Also implements - :class:`VersionRange ` and - :class:`VersionList `. All three are - comparable with each other and offer union and intersection - operations. Spack uses these classes to compare versions and to - manage version constraints on specs. Comparison semantics are - similar to the ``LooseVersion`` class in ``distutils`` and to the - way RPM compares version strings. + Implements a simple :class:`~spack.version.Version` class with simple + comparison semantics. Also implements :class:`~spack.version.VersionRange` + and :class:`~spack.version.VersionList`. All three are comparable with each + other and offer union and intersection operations. Spack uses these classes + to compare versions and to manage version constraints on specs. Comparison + semantics are similar to the ``LooseVersion`` class in ``distutils`` and to + the way RPM compares version strings. :mod:`spack.compilers` Submodules contains descriptors for all valid compilers in Spack. @@ -232,7 +226,7 @@ Build environment :mod:`spack.stage` Handles creating temporary directories for builds. -:mod:`spack.compilation` +:mod:`spack.build_environment` This contains utility functions used by the compiler wrapper script, ``cc``. @@ -257,22 +251,19 @@ Unit tests Implements Spack's test suite. Add a module and put its name in the test suite in ``__init__.py`` to add more unit tests. -:mod:`spack.test.mock_packages` - This is a fake package hierarchy used to mock up packages for - Spack's test suite. - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Research and Monitoring Modules ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :mod:`spack.monitor` - Contains :class:`SpackMonitor `. This is accessed - from the ``spack install`` and ``spack analyze`` commands to send build - and package metadada up to a `Spack Monitor `_ server. + Contains :class:`~spack.monitor.SpackMonitorClient`. This is accessed from + the ``spack install`` and ``spack analyze`` commands to send build and + package metadata up to a `Spack Monitor + `_ server. :mod:`spack.analyzers` - A module folder with a :class:`AnalyzerBase ` + A module folder with a :class:`~spack.analyzers.analyzer_base.AnalyzerBase` that provides base functions to run, save, and (optionally) upload analysis results to a `Spack Monitor `_ server. @@ -286,7 +277,7 @@ Other Modules tarball URLs. :mod:`spack.error` - :class:`SpackError `, the base class for + :class:`~spack.error.SpackError`, the base class for Spack's exception hierarchy. :mod:`llnl.util.tty` @@ -335,8 +326,8 @@ Writing analyzers To write an analyzer, you should add a new python file to the analyzers module directory at ``lib/spack/spack/analyzers`` . Your analyzer should be a subclass of the :class:`AnalyzerBase `. For example, if you want -to add an analyzer class ``Myanalyzer`` you woul write to -``spack/analyzers/myanalyzer.py`` and import and +to add an analyzer class ``Myanalyzer`` you would write to +``spack/analyzers/myanalyzer.py`` and import and use the base as follows: .. code-block:: python @@ -347,7 +338,7 @@ use the base as follows: Note that the class name is your module file name, all lowercase -except for the first capital letter. You can look at other analyzers in +except for the first capital letter. You can look at other analyzers in that analyzer directory for examples. The guide here will tell you about the basic functions needed. ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -356,13 +347,13 @@ Analyzer Output Directory By default, when you run ``spack analyze run`` an analyzer output directory will be created in your spack user directory in your ``$HOME``. The reason we output here -is because the install directory might not always be writable. +is because the install directory might not always be writable. .. code-block:: console ~/.spack/ analyzers - + Result files will be written here, organized in subfolders in the same structure as the package, with each analyzer owning it's own subfolder. for example: @@ -380,11 +371,11 @@ as the package, with each analyzer owning it's own subfolder. for example: │   └── spack-analyzer-install-files.json └── libabigail └── lib - └── spack-analyzer-libabigail-libz.so.1.2.11.xml + └── spack-analyzer-libabigail-libz.so.1.2.11.xml Notice that for the libabigail analyzer, since results are generated per object, -we honor the object's folder in case there are equivalently named files in +we honor the object's folder in case there are equivalently named files in different folders. The result files are typically written as json so they can be easily read and uploaded in a future interaction with a monitor. @@ -426,7 +417,7 @@ and then return the object with a key as the analyzer name. The result data should be a list of objects, each with a name, ``analyzer_name``, ``install_file``, and one of ``value`` or ``binary_value``. The install file should be for a relative path, and not the absolute path. For example, let's say we extract a metric called -``metric`` for ``bin/wget`` using our analyzer ``thebest-analyzer``. +``metric`` for ``bin/wget`` using our analyzer ``thebest-analyzer``. We might have data that looks like this: .. code-block:: python @@ -482,7 +473,7 @@ Saving Analyzer Results The analyzer will have ``save_result`` called, with the result object generated to save it to the filesystem, and if the user has added the ``--monitor`` flag to upload it to a monitor server. If your result follows an accepted result -format and you don't need to parse it further, you don't need to add this +format and you don't need to parse it further, you don't need to add this function to your class. However, if your result data is large or otherwise needs additional parsing, you can define it. If you define the function, it is useful to know about the ``output_dir`` property, which you can join @@ -548,7 +539,7 @@ each one (separately) to the monitor: Notice that this function, if you define it, requires a result object (generated by ``run()``, a monitor (if you want to send), and a boolean ``overwrite`` to be used -to check if a result exists first, and not write to it if the result exists and +to check if a result exists first, and not write to it if the result exists and overwrite is False. Also notice that since we already saved these files to the analyzer metadata folder, we return early if a monitor isn't defined, because this function serves to send results to the monitor. If you haven't saved anything to the analyzer metadata folder yet, you might want to do that here. You should also use ``tty.info`` to give the user a message of "Writing result to $DIRNAME." @@ -616,7 +607,7 @@ types of hooks in the ``__init__.py``, and then python files in that folder can use hook functions. The files are automatically parsed, so if you write a new file for some integration (e.g., ``lib/spack/spack/hooks/myintegration.py`` you can then write hook functions in that file that will be automatically detected, -and run whenever your hook is called. This section will cover the basic kind +and run whenever your hook is called. This section will cover the basic kind of hooks, and how to write them. ^^^^^^^^^^^^^^ @@ -624,7 +615,7 @@ Types of Hooks ^^^^^^^^^^^^^^ The following hooks are currently implemented to make it easy for you, -the developer, to add hooks at different stages of a spack install or similar. +the developer, to add hooks at different stages of a spack install or similar. If there is a hook that you would like and is missing, you can propose to add a new one. """"""""""""""""""""" @@ -632,9 +623,9 @@ If there is a hook that you would like and is missing, you can propose to add a """"""""""""""""""""" A ``pre_install`` hook is run within an install subprocess, directly before -the install starts. It expects a single argument of a spec, and is run in +the install starts. It expects a single argument of a spec, and is run in a multiprocessing subprocess. Note that if you see ``pre_install`` functions associated with packages these are not hooks -as we have defined them here, but rather callback functions associated with +as we have defined them here, but rather callback functions associated with a package install. @@ -657,7 +648,7 @@ here. This hook is run at the beginning of ``lib/spack/spack/installer.py``, in the install function of a ``PackageInstaller``, and importantly is not part of a build process, but before it. This is when -we have just newly grabbed the task, and are preparing to install. If you +we have just newly grabbed the task, and are preparing to install. If you write a hook of this type, you should provide the spec to it. .. code-block:: python @@ -666,7 +657,7 @@ write a hook of this type, you should provide the spec to it. """On start of an install, we want to... """ print('on_install_start') - + """""""""""""""""""""""""""" ``on_install_success(spec)`` @@ -744,8 +735,8 @@ to trigger after anything is written to a logger. You would add it as follows: post_install = HookRunner('post_install') # hooks related to logging - post_log_write = HookRunner('post_log_write') # <- here is my new hook! - + post_log_write = HookRunner('post_log_write') # <- here is my new hook! + You then need to decide what arguments my hook would expect. Since this is related to logging, let's say that you want a message and level. That means @@ -775,7 +766,7 @@ In this example, we use it outside of a logger that is already defined: This is not to say that this would be the best way to implement an integration with the logger (you'd probably want to write a custom logger, or you could -have the hook defined within the logger) but serves as an example of writing a hook. +have the hook defined within the logger) but serves as an example of writing a hook. ---------- Unit tests @@ -905,7 +896,7 @@ just like you would with the normal ``python`` command. ^^^^^^^^^^^^^^^ Spack blame is a way to quickly see contributors to packages or files -in the spack repository. You should provide a target package name or +in the spack repository. You should provide a target package name or file name to the command. Here is an example asking to see contributions for the package "python": @@ -915,8 +906,8 @@ for the package "python": LAST_COMMIT LINES % AUTHOR EMAIL 2 weeks ago 3 0.3 Mickey Mouse a month ago 927 99.7 Minnie Mouse - - 2 weeks ago 930 100.0 + + 2 weeks ago 930 100.0 By default, you will get a table view (shown above) sorted by date of contribution, @@ -1287,7 +1278,7 @@ Publishing a release on GitHub #. Create the release in GitHub. - * Go to + * Go to `github.com/spack/spack/releases `_ and click ``Draft a new release``. diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 59dad4f966c..6616d2a331a 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -2884,52 +2884,52 @@ The package base class, usually specialized for a given build system, determines actual set of entities available for overriding. The classes that are currently provided by Spack are: - +-------------------------------+----------------------------------+ - | **Base Class** | **Purpose** | - +===============================+==================================+ - | :py:class:`.Package` | General base class not | - | | specialized for any build system | - +-------------------------------+----------------------------------+ - | :py:class:`.MakefilePackage` | Specialized class for packages | - | | built invoking | - | | hand-written Makefiles | - +-------------------------------+----------------------------------+ - | :py:class:`.AutotoolsPackage` | Specialized class for packages | - | | built using GNU Autotools | - +-------------------------------+----------------------------------+ - | :py:class:`.CMakePackage` | Specialized class for packages | - | | built using CMake | - +-------------------------------+----------------------------------+ - | :py:class:`.CudaPackage` | A helper class for packages that | - | | use CUDA | - +-------------------------------+----------------------------------+ - | :py:class:`.QMakePackage` | Specialized class for packages | - | | build using QMake | - +-------------------------------+----------------------------------+ - | :py:class:`.ROCmPackage` | A helper class for packages that | - | | use ROCm | - +-------------------------------+----------------------------------+ - | :py:class:`.SConsPackage` | Specialized class for packages | - | | built using SCons | - +-------------------------------+----------------------------------+ - | :py:class:`.WafPackage` | Specialized class for packages | - | | built using Waf | - +-------------------------------+----------------------------------+ - | :py:class:`.RPackage` | Specialized class for | - | | :py:class:`.R` extensions | - +-------------------------------+----------------------------------+ - | :py:class:`.OctavePackage` | Specialized class for | - | | :py:class:`.Octave` packages | - +-------------------------------+----------------------------------+ - | :py:class:`.PythonPackage` | Specialized class for | - | | :py:class:`.Python` extensions | - +-------------------------------+----------------------------------+ - | :py:class:`.PerlPackage` | Specialized class for | - | | :py:class:`.Perl` extensions | - +-------------------------------+----------------------------------+ - | :py:class:`.IntelPackage` | Specialized class for licensed | - | | Intel software | - +-------------------------------+----------------------------------+ ++-------------------------=--------------------------------+----------------------------------+ +| **Base Class** | **Purpose** | ++==========================================================+==================================+ +| :class:`~spack.package.Package` | General base class not | +| | specialized for any build system | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.makefile.MakefilePackage` | Specialized class for packages | +| | built invoking | +| | hand-written Makefiles | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.autotools.AutotoolsPackage` | Specialized class for packages | +| | built using GNU Autotools | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.cmake.CMakePackage` | Specialized class for packages | +| | built using CMake | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.cuda.CudaPackage` | A helper class for packages that | +| | use CUDA | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.qmake.QMakePackage` | Specialized class for packages | +| | built using QMake | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.rocm.ROCmPackage` | A helper class for packages that | +| | use ROCm | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.scons.SConsPackage` | Specialized class for packages | +| | built using SCons | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.waf.WafPackage` | Specialized class for packages | +| | built using Waf | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.r.RPackage` | Specialized class for | +| | R extensions | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.octave.OctavePackage` | Specialized class for | +| | Octave packages | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.python.PythonPackage` | Specialized class for | +| | Python extensions | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.perl.PerlPackage` | Specialized class for | +| | Perl extensions | ++----------------------------------------------------------+----------------------------------+ +| :class:`~spack.build_systems.intel.IntelPackage` | Specialized class for licensed | +| | Intel software | ++----------------------------------------------------------+----------------------------------+ .. note:: @@ -2939,7 +2939,7 @@ The classes that are currently provided by Spack are: rare cases where manual intervention is needed we need to stress that a package base class depends on the *build system* being used, not the language of the package. For example, a Python extension installed with CMake would ``extends('python')`` and - subclass from :py:class:`.CMakePackage`. + subclass from :class:`~spack.build_systems.cmake.CMakePackage`. ^^^^^^^^^^^^^^^^^^^^^ Installation pipeline @@ -4079,7 +4079,7 @@ prefix **before** ``make install``. Builds like this can falsely report success when an error occurs before the installation is complete. Simple sanity checks can be used to identify files and or directories that are required of a successful installation. Spack checks for the presence of -the files and directories after ``install()`` runs. +the files and directories after ``install()`` runs. If any of the listed files or directories are missing, then the build will fail and the install prefix will be removed. If they all exist, then Spack @@ -4193,7 +4193,7 @@ need to use two decorators for each phase test method: The first decorator tells Spack when in the installation process to run your test method installation process; namely *after* the provided installation phase. The second decorator tells Spack to only run the -checks when the ``--test`` option is provided on the command line. +checks when the ``--test`` option is provided on the command line. .. note:: @@ -4267,17 +4267,17 @@ tests can be performed days, even weeks, after the software is installed. Stand-alone tests are checks that should run relatively quickly -- as in on the order of at most a few minutes -- and ideally execute all -aspects of the installed software, or at least key functionality. +aspects of the installed software, or at least key functionality. .. note:: Execution speed is important because these tests are intended to quickly assess whether the installed software works on the system. - + Failing stand-alone tests indicate that there is no reason to proceed with more resource-intensive tests. - + Passing stand-alone (or smoke) tests can lead to more thorough testing, such as extensive unit or regression tests, or tests that run at scale. Spack support for more thorough testing is @@ -4307,7 +4307,7 @@ file such that: test_stage: /path/to/stage The package can access this path **during test processing** using -`self.test_suite.stage`. +`self.test_suite.stage`. .. note:: @@ -4388,7 +4388,7 @@ can be implemented as shown below. @run_after('install') def copy_test_sources(self): srcs = ['tests', - join_path('examples', 'foo.c'), + join_path('examples', 'foo.c'), join_path('examples', 'bar.c')] self.cache_extra_test_sources(srcs) @@ -4446,7 +4446,7 @@ Examples include: - expected test output These extra files should be added to the ``test`` subdirectory of the -package in the Spack repository. +package in the Spack repository. Spack will **automatically copy** the contents of that directory to the test staging directory for stand-alone testing. The ``test`` method can @@ -4471,7 +4471,7 @@ The signature for ``get_escaped_text_output`` is: where ``filename`` is the path to the file containing the expected output. -The ``filename`` for a :ref:`custom file ` can be +The ``filename`` for a :ref:`custom file ` can be accessed and used as illustrated by a simplified version of an ``sqlite`` package check: @@ -4591,10 +4591,10 @@ where each argument has the following meaning: Options are a list of strings to be passed to the executable when it runs. - + The default is ``[]``, which means no options are provided to the executable. - + * ``expected`` is an optional list of expected output strings. Spack requires every string in ``expected`` to be a regex matching @@ -4605,31 +4605,31 @@ where each argument has the following meaning: The expected output can be :ref:`read from a file `. - + The default is ``expected=[]``, so Spack will not check the output. - + * ``status`` is the optional expected return code(s). A list of return codes corresponding to successful execution can be provided (e.g., ``status=[0,3,7]``). Support for non-zero return codes allows for basic **expected failure** tests as well as different return codes across versions of the software. - + The default is ``status=[0]``, which corresponds to **successful** execution in the sense that the executable does not exit with a failure code or raise an exception. - + * ``installed`` is used to require ``exe`` to be within the package prefix. - + If ``True``, then the path for ``exe`` is required to be within the package prefix; otherwise, the path is not constrained. - + The default is ``False``, so the fully qualified path for ``exe`` does **not** need to be within the installation directory. - + * ``purpose`` is an optional heading describing the the test part. - + Output from the test is written to a test log file so this argument serves as a searchable heading in text logs to highlight the start of the test part. Having a description can be helpful when debugging @@ -4644,10 +4644,10 @@ where each argument has the following meaning: The default is ``False``, which means the test executable must be present for any installable version of the software. - + * ``work_dir`` is the path to the directory from which the executable will run. - + The default of ``None`` corresponds to the current directory (``'.'``). """"""""""""""""""""""""""""""""""""""""" @@ -4754,7 +4754,7 @@ where only the outputs for the first of each set are shown: Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - + PASSED ... ==> [2021-04-26-17:35:20.493921] test: checking mpirun output @@ -4915,7 +4915,7 @@ This is already part of the boilerplate for packages created with Filtering functions ^^^^^^^^^^^^^^^^^^^ -:py:func:`filter_file(regex, repl, *filenames, **kwargs) ` +:py:func:`filter_file(regex, repl, *filenames, **kwargs) ` Works like ``sed`` but with Python regular expression syntax. Takes a regular expression, a replacement, and a set of files. ``repl`` can be a raw string or a callable function. If it is a raw string, @@ -4953,7 +4953,7 @@ Filtering functions filter_file('CXX="c++"', 'CXX="%s"' % self.compiler.cxx, prefix.bin.mpicxx) -:py:func:`change_sed_delimiter(old_delim, new_delim, *filenames) ` +:py:func:`change_sed_delimiter(old_delim, new_delim, *filenames) ` Some packages, like TAU, have a build system that can't install into directories with, e.g. '@' in the name, because they use hard-coded ``sed`` commands in their build. @@ -4975,14 +4975,14 @@ Filtering functions File functions ^^^^^^^^^^^^^^ -:py:func:`ancestor(dir, n=1) ` +:py:func:`ancestor(dir, n=1) ` Get the n\ :sup:`th` ancestor of the directory ``dir``. -:py:func:`can_access(path) ` +:py:func:`can_access(path) ` True if we can read and write to the file at ``path``. Same as native python ``os.access(file_name, os.R_OK|os.W_OK)``. -:py:func:`install(src, dest) ` +:py:func:`install(src, dest) ` Install a file to a particular location. For example, install a header into the ``include`` directory under the install ``prefix``: @@ -4990,14 +4990,14 @@ File functions install('my-header.h', prefix.include) -:py:func:`join_path(*paths) ` +:py:func:`join_path(*paths) ` An alias for ``os.path.join``. This joins paths using the OS path separator. -:py:func:`mkdirp(*paths) ` +:py:func:`mkdirp(*paths) ` Create each of the directories in ``paths``, creating any parent directories if they do not exist. -:py:func:`working_dir(dirname, kwargs) ` +:py:func:`working_dir(dirname, kwargs) ` This is a Python `Context Manager `_ that makes it easier to work with subdirectories in builds. You use this with the @@ -5039,7 +5039,7 @@ File functions The ``create=True`` keyword argument causes the command to create the directory if it does not exist. -:py:func:`touch(path) ` +:py:func:`touch(path) ` Create an empty file at ``path``. .. _make-package-findable: diff --git a/lib/spack/llnl/util/argparsewriter.py b/lib/spack/llnl/util/argparsewriter.py index 6d44713e39d..1ba5bd5c372 100644 --- a/lib/spack/llnl/util/argparsewriter.py +++ b/lib/spack/llnl/util/argparsewriter.py @@ -326,7 +326,7 @@ def end_function(self, prog=None): """Returns the syntax needed to end a function definition. Parameters: - prog (str, optional): the command name + prog (str or None): the command name Returns: str: the function definition ending diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py index 0ebc35a0409..3cf6553165a 100644 --- a/lib/spack/llnl/util/filesystem.py +++ b/lib/spack/llnl/util/filesystem.py @@ -444,7 +444,7 @@ def copy_tree(src, dest, symlinks=True, ignore=None, _permissions=False): src (str): the directory to copy dest (str): the destination directory symlinks (bool): whether or not to preserve symlinks - ignore (function): function indicating which files to ignore + ignore (typing.Callable): function indicating which files to ignore _permissions (bool): for internal use only Raises: @@ -518,7 +518,7 @@ def install_tree(src, dest, symlinks=True, ignore=None): src (str): the directory to install dest (str): the destination directory symlinks (bool): whether or not to preserve symlinks - ignore (function): function indicating which files to ignore + ignore (typing.Callable): function indicating which files to ignore Raises: IOError: if *src* does not match any files or directories @@ -557,12 +557,12 @@ def mkdirp(*paths, **kwargs): paths (str): paths to create with mkdirp Keyword Aguments: - mode (permission bits or None, optional): optional permissions to set + mode (permission bits or None): optional permissions to set on the created directory -- use OS default if not provided - group (group name or None, optional): optional group for permissions of + group (group name or None): optional group for permissions of final created directory -- use OS default if not provided. Only used if world write permissions are not set - default_perms ('parents' or 'args', optional): The default permissions + default_perms (str or None): one of 'parents' or 'args'. The default permissions that are set for directories that are not themselves an argument for mkdirp. 'parents' means intermediate directories get the permissions of their direct parent directory, 'args' means @@ -866,7 +866,7 @@ def traverse_tree(source_root, dest_root, rel_path='', **kwargs): Keyword Arguments: order (str): Whether to do pre- or post-order traversal. Accepted values are 'pre' and 'post' - ignore (function): function indicating which files to ignore + ignore (typing.Callable): function indicating which files to ignore follow_nonexisting (bool): Whether to descend into directories in ``src`` that do not exit in ``dest``. Default is True follow_links (bool): Whether to descend into symlinks in ``src`` @@ -1114,11 +1114,11 @@ def find(root, files, recursive=True): Parameters: root (str): The root directory to start searching from files (str or Sequence): Library name(s) to search for - recurse (bool, optional): if False search only root folder, + recursive (bool): if False search only root folder, if True descends top-down from the root. Defaults to True. Returns: - list of strings: The files that have been found + list: The files that have been found """ if isinstance(files, six.string_types): files = [files] @@ -1200,7 +1200,7 @@ def directories(self): ['/dir1', '/dir2'] Returns: - list of strings: A list of directories + list: A list of directories """ return list(dedupe( os.path.dirname(x) for x in self.files if os.path.dirname(x) @@ -1218,7 +1218,7 @@ def basenames(self): ['a.h', 'b.h'] Returns: - list of strings: A list of base-names + list: A list of base-names """ return list(dedupe(os.path.basename(x) for x in self.files)) @@ -1305,7 +1305,7 @@ def headers(self): """Stable de-duplication of the headers. Returns: - list of strings: A list of header files + list: A list of header files """ return self.files @@ -1318,7 +1318,7 @@ def names(self): ['a', 'b'] Returns: - list of strings: A list of files without extensions + list: A list of files without extensions """ names = [] @@ -1409,9 +1409,9 @@ def find_headers(headers, root, recursive=False): ======= ==================================== Parameters: - headers (str or list of str): Header name(s) to search for + headers (str or list): Header name(s) to search for root (str): The root directory to start searching from - recursive (bool, optional): if False search only root folder, + recursive (bool): if False search only root folder, if True descends top-down from the root. Defaults to False. Returns: @@ -1447,7 +1447,7 @@ def find_all_headers(root): in the directory passed as argument. Args: - root (path): directory where to look recursively for header files + root (str): directory where to look recursively for header files Returns: List of all headers found in ``root`` and subdirectories. @@ -1467,7 +1467,7 @@ def libraries(self): """Stable de-duplication of library files. Returns: - list of strings: A list of library files + list: A list of library files """ return self.files @@ -1480,7 +1480,7 @@ def names(self): ['a', 'b'] Returns: - list of strings: A list of library names + list: A list of library names """ names = [] @@ -1565,8 +1565,8 @@ def find_system_libraries(libraries, shared=True): ======= ==================================== Parameters: - libraries (str or list of str): Library name(s) to search for - shared (bool, optional): if True searches for shared libraries, + libraries (str or list): Library name(s) to search for + shared (bool): if True searches for shared libraries, otherwise for static. Defaults to True. Returns: @@ -1616,11 +1616,11 @@ def find_libraries(libraries, root, shared=True, recursive=False): ======= ==================================== Parameters: - libraries (str or list of str): Library name(s) to search for + libraries (str or list): Library name(s) to search for root (str): The root directory to start searching from - shared (bool, optional): if True searches for shared libraries, + shared (bool): if True searches for shared libraries, otherwise for static. Defaults to True. - recursive (bool, optional): if False search only root folder, + recursive (bool): if False search only root folder, if True descends top-down from the root. Defaults to False. Returns: diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py index 00b0490600c..3e81a34422b 100644 --- a/lib/spack/llnl/util/lang.py +++ b/lib/spack/llnl/util/lang.py @@ -573,8 +573,8 @@ def pretty_date(time, now=None): """Convert a datetime or timestamp to a pretty, relative date. Args: - time (datetime or int): date to print prettily - now (datetime): dateimte for 'now', i.e. the date the pretty date + time (datetime.datetime or int): date to print prettily + now (datetime.datetime): datetime for 'now', i.e. the date the pretty date is relative to (default is datetime.now()) Returns: @@ -648,7 +648,7 @@ def pretty_string_to_date(date_str, now=None): or be a *pretty date* (like ``yesterday`` or ``two months ago``) Returns: - (datetime): datetime object corresponding to ``date_str`` + (datetime.datetime): datetime object corresponding to ``date_str`` """ pattern = {} diff --git a/lib/spack/llnl/util/lock.py b/lib/spack/llnl/util/lock.py index cd390693c4f..0c0cc7f634e 100644 --- a/lib/spack/llnl/util/lock.py +++ b/lib/spack/llnl/util/lock.py @@ -14,9 +14,19 @@ import spack.util.string -__all__ = ['Lock', 'LockTransaction', 'WriteTransaction', 'ReadTransaction', - 'LockError', 'LockTimeoutError', - 'LockPermissionError', 'LockROFileError', 'CantCreateLockError'] +__all__ = [ + 'Lock', + 'LockDowngradeError', + 'LockUpgradeError', + 'LockTransaction', + 'WriteTransaction', + 'ReadTransaction', + 'LockError', + 'LockTimeoutError', + 'LockPermissionError', + 'LockROFileError', + 'CantCreateLockError' +] #: Mapping of supported locks to description lock_type = {fcntl.LOCK_SH: 'read', fcntl.LOCK_EX: 'write'} @@ -401,7 +411,7 @@ def release_read(self, release_fn=None): """Releases a read lock. Arguments: - release_fn (callable): function to call *before* the last recursive + release_fn (typing.Callable): function to call *before* the last recursive lock (read or write) is released. If the last recursive lock will be released, then this will call @@ -437,7 +447,7 @@ def release_write(self, release_fn=None): """Releases a write lock. Arguments: - release_fn (callable): function to call before the last recursive + release_fn (typing.Callable): function to call before the last recursive write is released. If the last recursive *write* lock will be released, then this @@ -533,10 +543,10 @@ class LockTransaction(object): Arguments: lock (Lock): underlying lock for this transaction to be accquired on enter and released on exit - acquire (callable or contextmanager): function to be called after lock - is acquired, or contextmanager to enter after acquire and leave + acquire (typing.Callable or contextlib.contextmanager): function to be called + after lock is acquired, or contextmanager to enter after acquire and leave before release. - release (callable): function to be called before release. If + release (typing.Callable): function to be called before release. If ``acquire`` is a contextmanager, this will be called *after* exiting the nexted context and before the lock is released. timeout (float): number of seconds to set for the timeout when diff --git a/lib/spack/llnl/util/tty/colify.py b/lib/spack/llnl/util/tty/colify.py index ca157e33037..22b824ac0c0 100644 --- a/lib/spack/llnl/util/tty/colify.py +++ b/lib/spack/llnl/util/tty/colify.py @@ -109,19 +109,17 @@ def colify(elts, **options): using ``str()``. Keyword Arguments: - output (stream): A file object to write to. Default is ``sys.stdout`` - indent (int): Optionally indent all columns by some number of spaces - padding (int): Spaces between columns. Default is 2 - width (int): Width of the output. Default is 80 if tty not detected - cols (int): Force number of columns. Default is to size to - terminal, or single-column if no tty - tty (bool): Whether to attempt to write to a tty. Default is to - autodetect a tty. Set to False to force single-column - output - method (str): Method to use to fit columns. Options are variable or - uniform. Variable-width columns are tighter, uniform - columns are all the same width and fit less data on - the screen + output (typing.IO): A file object to write to. Default is ``sys.stdout`` + indent (int): Optionally indent all columns by some number of spaces + padding (int): Spaces between columns. Default is 2 + width (int): Width of the output. Default is 80 if tty not detected + cols (int): Force number of columns. Default is to size to terminal, or + single-column if no tty + tty (bool): Whether to attempt to write to a tty. Default is to autodetect a + tty. Set to False to force single-column output + method (str): Method to use to fit columns. Options are variable or uniform. + Variable-width columns are tighter, uniform columns are all the same width + and fit less data on the screen """ # Get keyword arguments or set defaults cols = options.pop("cols", 0) diff --git a/lib/spack/spack/architecture.py b/lib/spack/spack/architecture.py index 951109c892b..17fbc0e2f14 100644 --- a/lib/spack/spack/architecture.py +++ b/lib/spack/spack/architecture.py @@ -193,8 +193,8 @@ def optimization_flags(self, compiler): the compiler passed as argument. Args: - compiler (CompilerSpec or Compiler): object that contains both the - name and the version of the compiler we want to use + compiler (spack.spec.CompilerSpec or spack.compiler.Compiler): object that + contains both the name and the version of the compiler we want to use """ # Mixed toolchains are not supported yet import spack.compilers diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 31ac93cffe7..647b71cfe3e 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -206,7 +206,7 @@ def find_built_spec(self, spec): The cache can be updated by calling ``update()`` on the cache. Args: - spec (Spec): Concrete spec to find + spec (spack.spec.Spec): Concrete spec to find Returns: An list of objects containing the found specs and mirror url where @@ -1079,14 +1079,14 @@ def download_tarball(spec, preferred_mirrors=None): path to downloaded tarball if successful, None otherwise. Args: - spec (Spec): Concrete spec + spec (spack.spec.Spec): Concrete spec preferred_mirrors (list): If provided, this is a list of preferred - mirror urls. Other configured mirrors will only be used if the - tarball can't be retrieved from one of these. + mirror urls. Other configured mirrors will only be used if the + tarball can't be retrieved from one of these. Returns: Path to the downloaded tarball, or ``None`` if the tarball could not - be downloaded from any configured mirrors. + be downloaded from any configured mirrors. """ if not spack.mirror.MirrorCollection(): tty.die("Please add a spack mirror to allow " + @@ -1455,7 +1455,7 @@ def get_mirrors_for_spec(spec=None, full_hash_match=False, indicating the mirrors on which it can be found Args: - spec (Spec): The spec to look for in binary mirrors + spec (spack.spec.Spec): The spec to look for in binary mirrors full_hash_match (bool): If True, only includes mirrors where the spec full hash matches the locally computed full hash of the ``spec`` argument. If False, any mirror which has a matching DAG hash @@ -1732,11 +1732,11 @@ def check_specs_against_mirrors(mirrors, specs, output_file=None, Arguments: mirrors (dict): Mirrors to check against - specs (iterable): Specs to check against mirrors - output_file (string): Path to output file to be written. If provided, + specs (typing.Iterable): Specs to check against mirrors + output_file (str): Path to output file to be written. If provided, mirrors with missing or out-of-date specs will be formatted as a JSON object and written to this file. - rebuild_on_errors (boolean): Treat any errors encountered while + rebuild_on_errors (bool): Treat any errors encountered while checking specs as a signal to rebuild package. Returns: 1 if any spec was out-of-date on any mirror, 0 otherwise. diff --git a/lib/spack/spack/bootstrap.py b/lib/spack/spack/bootstrap.py index 896c1cad4e0..af12f095f76 100644 --- a/lib/spack/spack/bootstrap.py +++ b/lib/spack/spack/bootstrap.py @@ -134,7 +134,7 @@ def get_executable(exe, spec=None, install=False): Args: exe (str): needed executable name - spec (Spec or str): spec to search for exe in (default exe) + spec (spack.spec.Spec or str): spec to search for exe in (default exe) install (bool): install spec if not available When ``install`` is True, Spack will use the python used to run Spack as an diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index c9be0bc1d84..7e99dc6441e 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -455,11 +455,11 @@ def determine_number_of_jobs( cap to the number of CPUs available to avoid oversubscription. Parameters: - parallel (bool): true when package supports parallel builds - command_line (int/None): command line override - config_default (int/None): config default number of jobs - max_cpus (int/None): maximum number of CPUs available. When None, this - value is automatically determined. + parallel (bool or None): true when package supports parallel builds + command_line (int or None): command line override + config_default (int or None): config default number of jobs + max_cpus (int or None): maximum number of CPUs available. When None, this + value is automatically determined. """ if not parallel: return 1 @@ -685,14 +685,14 @@ def get_std_cmake_args(pkg): """List of standard arguments used if a package is a CMakePackage. Returns: - list of str: standard arguments that would be used if this + list: standard arguments that would be used if this package were a CMakePackage instance. Args: - pkg (PackageBase): package under consideration + pkg (spack.package.PackageBase): package under consideration Returns: - list of str: arguments for cmake + list: arguments for cmake """ return spack.build_systems.cmake.CMakePackage._std_args(pkg) @@ -701,14 +701,14 @@ def get_std_meson_args(pkg): """List of standard arguments used if a package is a MesonPackage. Returns: - list of str: standard arguments that would be used if this + list: standard arguments that would be used if this package were a MesonPackage instance. Args: - pkg (PackageBase): package under consideration + pkg (spack.package.PackageBase): package under consideration Returns: - list of str: arguments for meson + list: arguments for meson """ return spack.build_systems.meson.MesonPackage._std_args(pkg) @@ -738,7 +738,7 @@ def load_external_modules(pkg): associated with them. Args: - pkg (PackageBase): package to load deps for + pkg (spack.package.PackageBase): package to load deps for """ for dep in list(pkg.spec.traverse()): external_modules = dep.external_modules or [] @@ -864,7 +864,7 @@ def modifications_from_dependencies(spec, context, custom_mods_only=True): CMAKE_PREFIX_PATH, or PKG_CONFIG_PATH). Args: - spec (Spec): spec for which we want the modifications + spec (spack.spec.Spec): spec for which we want the modifications context (str): either 'build' for build-time modifications or 'run' for run-time modifications """ @@ -1062,9 +1062,9 @@ def start_build_process(pkg, function, kwargs): Args: - pkg (PackageBase): package whose environment we should set up the + pkg (spack.package.PackageBase): package whose environment we should set up the child process for. - function (callable): argless function to run in the child + function (typing.Callable): argless function to run in the child process. Usage:: @@ -1149,7 +1149,7 @@ def get_package_context(traceback, context=3): """Return some context for an error message when the build fails. Args: - traceback (traceback): A traceback from some exception raised during + traceback: A traceback from some exception raised during install context (int): Lines of context to show before and after the line diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index 7ded0245de1..03923e3e518 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -30,7 +30,7 @@ class AutotoolsPackage(PackageBase): They all have sensible defaults and for many packages the only thing necessary will be to override the helper method - :py:meth:`~.AutotoolsPackage.configure_args`. + :meth:`~spack.build_systems.autotools.AutotoolsPackage.configure_args`. For a finer tuning you may also override: +-----------------------------------------------+--------------------+ @@ -331,7 +331,7 @@ def flags_to_build_system_args(self, flags): def configure(self, spec, prefix): """Runs configure with the arguments specified in - :py:meth:`~.AutotoolsPackage.configure_args` + :meth:`~spack.build_systems.autotools.AutotoolsPackage.configure_args` and an appropriately set prefix. """ options = getattr(self, 'configure_flag_args', []) @@ -376,8 +376,8 @@ def _activate_or_not( activation_value=None ): """This function contains the current implementation details of - :py:meth:`~.AutotoolsPackage.with_or_without` and - :py:meth:`~.AutotoolsPackage.enable_or_disable`. + :meth:`~spack.build_systems.autotools.AutotoolsPackage.with_or_without` and + :meth:`~spack.build_systems.autotools.AutotoolsPackage.enable_or_disable`. Args: name (str): name of the variant that is being processed @@ -385,7 +385,7 @@ def _activate_or_not( case of ``with_or_without``) deactivation_word (str): the default deactivation word ('without' in the case of ``with_or_without``) - activation_value (callable): callable that accepts a single + activation_value (typing.Callable): callable that accepts a single value. This value is either one of the allowed values for a multi-valued variant or the name of a bool-valued variant. Returns the parameter to be used when the value is activated. @@ -420,7 +420,7 @@ def _activate_or_not( for `` foo=x +bar`` Returns: - list of strings that corresponds to the activation/deactivation + list: list of strings that corresponds to the activation/deactivation of the variant that has been processed Raises: @@ -501,7 +501,7 @@ def with_or_without(self, name, activation_value=None): Args: name (str): name of a valid multi-valued variant - activation_value (callable): callable that accepts a single + activation_value (typing.Callable): callable that accepts a single value and returns the parameter to be used leading to an entry of the type ``--with-{name}={parameter}``. @@ -514,12 +514,13 @@ def with_or_without(self, name, activation_value=None): return self._activate_or_not(name, 'with', 'without', activation_value) def enable_or_disable(self, name, activation_value=None): - """Same as :py:meth:`~.AutotoolsPackage.with_or_without` but substitute - ``with`` with ``enable`` and ``without`` with ``disable``. + """Same as + :meth:`~spack.build_systems.autotools.AutotoolsPackage.with_or_without` + but substitute ``with`` with ``enable`` and ``without`` with ``disable``. Args: name (str): name of a valid multi-valued variant - activation_value (callable): if present accepts a single value + activation_value (typing.Callable): if present accepts a single value and returns the parameter to be used leading to an entry of the type ``--enable-{name}={parameter}`` diff --git a/lib/spack/spack/build_systems/cmake.py b/lib/spack/spack/build_systems/cmake.py index acf4a9dc531..a3a1bb51e33 100644 --- a/lib/spack/spack/build_systems/cmake.py +++ b/lib/spack/spack/build_systems/cmake.py @@ -236,7 +236,7 @@ def define_from_variant(self, cmake_var, variant=None): of ``cmake_var``. This utility function is similar to - :py:meth:`~.AutotoolsPackage.with_or_without`. + :meth:`~spack.build_systems.autotools.AutotoolsPackage.with_or_without`. Examples: diff --git a/lib/spack/spack/build_systems/intel.py b/lib/spack/spack/build_systems/intel.py index 2049669aeac..427cb75e492 100644 --- a/lib/spack/spack/build_systems/intel.py +++ b/lib/spack/spack/build_systems/intel.py @@ -368,7 +368,7 @@ def normalize_suite_dir(self, suite_dir_name, version_globs=['*.*.*']): toplevel psxevars.sh or equivalent file to source (and thus by the modulefiles that Spack produces). - version_globs (list of str): Suffix glob patterns (most specific + version_globs (list): Suffix glob patterns (most specific first) expected to qualify suite_dir_name to its fully version-specific install directory (as opposed to a compatibility directory or symlink). diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index fc6b8603507..3944d5450e5 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -216,10 +216,10 @@ def disambiguate_spec(spec, env, local=False, installed=True, first=False): spec (spack.spec.Spec): a spec to disambiguate env (spack.environment.Environment): a spack environment, if one is active, or None if no environment is active - local (boolean, default False): do not search chained spack instances - installed (boolean or any, or spack.database.InstallStatus or iterable - of spack.database.InstallStatus): install status argument passed to - database query. See ``spack.database.Database._query`` for details. + local (bool): do not search chained spack instances + installed (bool or spack.database.InstallStatus or typing.Iterable): + install status argument passed to database query. + See ``spack.database.Database._query`` for details. """ hashes = env.all_hashes() if env else None return disambiguate_spec_from_hashes(spec, hashes, local, installed, first) @@ -231,11 +231,11 @@ def disambiguate_spec_from_hashes(spec, hashes, local=False, Arguments: spec (spack.spec.Spec): a spec to disambiguate - hashes (iterable): a set of hashes of specs among which to disambiguate - local (boolean, default False): do not search chained spack instances - installed (boolean or any, or spack.database.InstallStatus or iterable - of spack.database.InstallStatus): install status argument passed to - database query. See ``spack.database.Database._query`` for details. + hashes (typing.Iterable): a set of hashes of specs among which to disambiguate + local (bool): do not search chained spack instances + installed (bool or spack.database.InstallStatus or typing.Iterable): + install status argument passed to database query. + See ``spack.database.Database._query`` for details. """ if local: matching_specs = spack.store.db.query_local(spec, hashes=hashes, @@ -333,9 +333,8 @@ def display_specs(specs, args=None, **kwargs): namespace. Args: - specs (list of spack.spec.Spec): the specs to display - args (optional argparse.Namespace): namespace containing - formatting arguments + specs (list): the specs to display + args (argparse.Namespace or None): namespace containing formatting arguments Keyword Args: paths (bool): Show paths with each displayed spec @@ -348,9 +347,9 @@ def display_specs(specs, args=None, **kwargs): indent (int): indent each line this much groups (bool): display specs grouped by arch/compiler (default True) decorators (dict): dictionary mappng specs to decorators - header_callback (function): called at start of arch/compiler groups + header_callback (typing.Callable): called at start of arch/compiler groups all_headers (bool): show headers even when arch/compiler aren't defined - output (stream): A file object to write to. Default is ``sys.stdout`` + output (typing.IO): A file object to write to. Default is ``sys.stdout`` """ def get_arg(name, default=None): diff --git a/lib/spack/spack/cmd/analyze.py b/lib/spack/spack/cmd/analyze.py index c2a6ec6a27d..0bdf47e73f6 100644 --- a/lib/spack/spack/cmd/analyze.py +++ b/lib/spack/spack/cmd/analyze.py @@ -58,9 +58,9 @@ def analyze_spec(spec, analyzers=None, outdir=None, monitor=None, overwrite=Fals analyze_spec(spec, args.analyzers, args.outdir, monitor) Args: - spec (Spec): spec object of installed package + spec (spack.spec.Spec): spec object of installed package analyzers (list): list of analyzer (keys) to run - monitor (monitor.SpackMonitorClient): a monitor client + monitor (spack.monitor.SpackMonitorClient): a monitor client overwrite (bool): overwrite result if already exists """ analyzers = analyzers or list(spack.analyzers.analyzer_types.keys()) diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index ebad6bb4b7b..ea1297c726c 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -239,12 +239,13 @@ def find_matching_specs(pkgs, allow_multiple_matches=False, env=None): concretized specs given from cli Args: - pkgs (string): spec to be matched against installed packages + pkgs (str): spec to be matched against installed packages allow_multiple_matches (bool): if True multiple matches are admitted - env (Environment): active environment, or ``None`` if there is not one + env (spack.environment.Environment or None): active environment, or ``None`` + if there is not one Return: - list of specs + list: list of specs """ hashes = env.all_hashes() if env else None diff --git a/lib/spack/spack/cmd/create.py b/lib/spack/spack/cmd/create.py index a6808486736..bccf3bf66d8 100644 --- a/lib/spack/spack/cmd/create.py +++ b/lib/spack/spack/cmd/create.py @@ -636,7 +636,7 @@ def get_name(args): provided, extract the name from that. Otherwise, use a default. Args: - args (param argparse.Namespace): The arguments given to + args (argparse.Namespace): The arguments given to ``spack create`` Returns: @@ -709,8 +709,7 @@ def get_versions(args, name): name (str): The name of the package Returns: - str and BuildSystemGuesser: Versions and hashes, and a - BuildSystemGuesser object + tuple: versions and hashes, and a BuildSystemGuesser object """ # Default version with hash @@ -794,7 +793,8 @@ def get_repository(args, name): name (str): The name of the package to create Returns: - Repo: A Repo object capable of determining the path to the package file + spack.repo.Repo: A Repo object capable of determining the path to the + package file """ spec = Spec(name) # Figure out namespace for spec diff --git a/lib/spack/spack/cmd/dependents.py b/lib/spack/spack/cmd/dependents.py index 242a07da368..6097f46ff91 100644 --- a/lib/spack/spack/cmd/dependents.py +++ b/lib/spack/spack/cmd/dependents.py @@ -59,7 +59,7 @@ def get_dependents(pkg_name, ideps, transitive=False, dependents=None): Args: pkg_name (str): name of the package whose dependents should be returned ideps (dict): dictionary of dependents, from inverted_dependencies() - transitive (bool, optional): return transitive dependents when True + transitive (bool or None): return transitive dependents when True """ if dependents is None: dependents = set() diff --git a/lib/spack/spack/cmd/install.py b/lib/spack/spack/cmd/install.py index 5a452a9232c..f71a788ec1a 100644 --- a/lib/spack/spack/cmd/install.py +++ b/lib/spack/spack/cmd/install.py @@ -198,9 +198,9 @@ def install_specs(cli_args, kwargs, specs): """Do the actual installation. Args: - cli_args (Namespace): argparse namespace with command arguments + cli_args (argparse.Namespace): argparse namespace with command arguments kwargs (dict): keyword arguments - specs (list of tuples): list of (abstract, concrete) spec tuples + specs (list): list of (abstract, concrete) spec tuples """ # handle active environment, if any diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 9d787a70a2e..ead4f8ac84c 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -69,12 +69,13 @@ def find_matching_specs(env, specs, allow_multiple_matches=False, force=False): concretized specs given from cli Args: - env (Environment): active environment, or ``None`` if there is not one + env (spack.environment.Environment): active environment, or ``None`` + if there is not one specs (list): list of specs to be matched against installed packages allow_multiple_matches (bool): if True multiple matches are admitted Return: - list of specs + list: list of specs """ # constrain uninstall resolution to current environment if one is active hashes = env.all_hashes() if env else None @@ -118,15 +119,13 @@ def installed_dependents(specs, env): Args: specs (list): list of Specs - env (Environment): the active environment, or None + env (spack.environment.Environment or None): the active environment, or None Returns: - (tuple of dicts): two mappings: one from specs to their dependent - environments in the active environment (or global scope if - there is no environment), and one from specs to their - dependents in *inactive* environments (empty if there is no - environment - + tuple: two mappings: one from specs to their dependent environments in the + active environment (or global scope if there is no environment), and one from + specs to their dependents in *inactive* environments (empty if there is no + environment """ active_dpts = {} inactive_dpts = {} @@ -155,9 +154,9 @@ def dependent_environments(specs): Args: specs (list): list of Specs - Returns: - (dict): mapping from spec to lists of dependent Environments + Returns: + dict: mapping from spec to lists of dependent Environments """ dependents = {} for env in ev.all_environments(): @@ -176,9 +175,10 @@ def inactive_dependent_environments(spec_envs): have no dependent environments. Return the result. Args: - (dict): mapping from spec to lists of dependent Environments + spec_envs (dict): mapping from spec to lists of dependent Environments + Returns: - (dict): mapping from spec to lists of *inactive* dependent Environments + dict: mapping from spec to lists of *inactive* dependent Environments """ spec_inactive_envs = {} for spec, de_list in spec_envs.items(): @@ -203,7 +203,8 @@ def do_uninstall(env, specs, force): """Uninstalls all the specs in a list. Args: - env (Environment): active environment, or ``None`` if there is not one + env (spack.environment.Environment or None): active environment, or ``None`` + if there is not one specs (list): list of specs to be uninstalled force (bool): force uninstallation (boolean) """ diff --git a/lib/spack/spack/cmd/url.py b/lib/spack/spack/cmd/url.py index 1576a4f7627..8d9232203f5 100644 --- a/lib/spack/spack/cmd/url.py +++ b/lib/spack/spack/cmd/url.py @@ -502,7 +502,7 @@ def remove_separators(version): Unfortunately, this also means that 1.23 and 12.3 are equal. Args: - version (str or Version): A version + version (str or spack.version.Version): A version Returns: str: The version with all separator characters removed diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 537e8211c33..d60ab971bc3 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -135,8 +135,8 @@ def add_compilers_to_config(compilers, scope=None, init_config=True): """Add compilers to the config for the specified architecture. Arguments: - - compilers: a list of Compiler objects. - - scope: configuration scope to modify. + compilers: a list of Compiler objects. + scope: configuration scope to modify. """ compiler_config = get_compiler_config(scope, init_config) for compiler in compilers: @@ -151,8 +151,8 @@ def remove_compiler_from_config(compiler_spec, scope=None): """Remove compilers from the config, by spec. Arguments: - - compiler_specs: a list of CompilerSpec objects. - - scope: configuration scope to modify. + compiler_specs: a list of CompilerSpec objects. + scope: configuration scope to modify. """ # Need a better way for this global _cache_config_file @@ -544,8 +544,8 @@ def arguments_to_detect_version_fn(operating_system, paths): function by providing a method called with the same name. Args: - operating_system (OperatingSystem): the operating system on which - we are looking for compilers + operating_system (spack.architecture.OperatingSystem): the operating system + on which we are looking for compilers paths: paths to search for compilers Returns: @@ -649,7 +649,7 @@ def make_compiler_list(detected_versions): valid version Returns: - list of Compiler objects + list: list of Compiler objects """ group_fn = lambda x: (x.id, x.variation, x.language) sorted_compilers = sorted(detected_versions, key=group_fn) @@ -715,7 +715,7 @@ def is_mixed_toolchain(compiler): False otherwise. Args: - compiler (Compiler): a valid compiler object + compiler (spack.compiler.Compiler): a valid compiler object """ cc = os.path.basename(compiler.cc or '') cxx = os.path.basename(compiler.cxx or '') diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py index 5ceaef8e7ba..93399efb03c 100644 --- a/lib/spack/spack/config.py +++ b/lib/spack/spack/config.py @@ -17,8 +17,8 @@ And corresponding :ref:`per-platform scopes `. Important functions in this module are: -* :py:func:`get_config` -* :py:func:`update_config` +* :func:`~spack.config.Configuration.get_config` +* :func:`~spack.config.Configuration.update_config` ``get_config`` reads in YAML data for a particular scope and returns it. Callers can then modify the data and write it back with @@ -722,7 +722,7 @@ def override(path_or_scope, value=None): Arguments: path_or_scope (ConfigScope or str): scope or single option to override - value (object, optional): value for the single option + value (object or None): value for the single option Temporarily push a scope on the current configuration, then remove it after the context completes. If a single option is provided, create @@ -1163,7 +1163,7 @@ def default_modify_scope(section='config'): priority scope. Arguments: - section (boolean): Section for which to get the default scope. + section (bool): Section for which to get the default scope. If this is not 'compilers', a general (non-platform) scope is used. """ if section == 'compilers': diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index 60e93ed49b9..251d3964bcb 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -171,13 +171,13 @@ class InstallRecord(object): dependents left. Args: - spec (Spec): spec tracked by the install record + spec (spack.spec.Spec): spec tracked by the install record path (str): path where the spec has been installed installed (bool): whether or not the spec is currently installed ref_count (int): number of specs that depend on this one - explicit (bool, optional): whether or not this spec was explicitly + explicit (bool or None): whether or not this spec was explicitly installed, or pulled-in as a dependency of something else - installation_time (time, optional): time of the installation + installation_time (datetime.datetime or None): time of the installation """ def __init__( @@ -256,36 +256,36 @@ def __getattribute__(self, name): database. If it is a spec, we'll evaluate ``spec.satisfies(query_spec)`` - known (bool or any, optional): Specs that are "known" are those + known (bool or None): Specs that are "known" are those for which Spack can locate a ``package.py`` file -- i.e., Spack "knows" how to install them. Specs that are unknown may represent packages that existed in a previous version of Spack, but have since either changed their name or been removed - installed (bool or any, or InstallStatus or iterable of - InstallStatus, optional): if ``True``, includes only installed + installed (bool or InstallStatus or typing.Iterable or None): + if ``True``, includes only installed specs in the search; if ``False`` only missing specs, and if ``any``, all specs in database. If an InstallStatus or iterable of InstallStatus, returns specs whose install status (installed, deprecated, or missing) matches (one of) the InstallStatus. (default: True) - explicit (bool or any, optional): A spec that was installed + explicit (bool or None): A spec that was installed following a specific user request is marked as explicit. If instead it was pulled-in as a dependency of a user requested spec it's considered implicit. - start_date (datetime, optional): filters the query discarding - specs that have been installed before ``start_date``. + start_date (datetime.datetime or None): filters the query + discarding specs that have been installed before ``start_date``. - end_date (datetime, optional): filters the query discarding + end_date (datetime.datetime or None): filters the query discarding specs that have been installed after ``end_date``. - hashes (container): list or set of hashes that we can use to + hashes (typing.Container): list or set of hashes that we can use to restrict the search - in_buildcache (bool or any, optional): Specs that are marked in + in_buildcache (bool or None): Specs that are marked in this database as part of an associated binary cache are ``in_buildcache``. All other specs are not. This field is used for querying mirror indices. Default is ``any``. @@ -449,7 +449,7 @@ def clear_failure(self, spec, force=False): see `mark_failed()`. Args: - spec (Spec): the spec whose failure indicators are being removed + spec (spack.spec.Spec): the spec whose failure indicators are being removed force (bool): True if the failure information should be cleared when a prefix failure lock exists for the file or False if the failure should not be cleared (e.g., it may be @@ -1391,10 +1391,10 @@ def get_by_hash_local(self, *args, **kwargs): Arguments: dag_hash (str): hash (or hash prefix) to look up - default (object, optional): default value to return if dag_hash is + default (object or None): default value to return if dag_hash is not in the DB (default: None) - installed (bool or any, or InstallStatus or iterable of - InstallStatus, optional): if ``True``, includes only installed + installed (bool or InstallStatus or typing.Iterable or None): + if ``True``, includes only installed specs in the search; if ``False`` only missing specs, and if ``any``, all specs in database. If an InstallStatus or iterable of InstallStatus, returns specs whose install status @@ -1417,14 +1417,13 @@ def get_by_hash(self, dag_hash, default=None, installed=any): Arguments: dag_hash (str): hash (or hash prefix) to look up - default (object, optional): default value to return if dag_hash is + default (object or None): default value to return if dag_hash is not in the DB (default: None) - installed (bool or any, or InstallStatus or iterable of - InstallStatus, optional): if ``True``, includes only installed - specs in the search; if ``False`` only missing specs, and if - ``any``, all specs in database. If an InstallStatus or iterable - of InstallStatus, returns specs whose install status - (installed, deprecated, or missing) matches (one of) the + installed (bool or InstallStatus or typing.Iterable or None): + if ``True``, includes only installed specs in the search; if ``False`` + only missing specs, and if ``any``, all specs in database. If an + InstallStatus or iterable of InstallStatus, returns specs whose install + status (installed, deprecated, or missing) matches (one of) the InstallStatus. (default: any) ``installed`` defaults to ``any`` so that we can refer to any @@ -1596,7 +1595,7 @@ def update_explicit(self, spec, explicit): Update the spec's explicit state in the database. Args: - spec (Spec): the spec whose install record is being updated + spec (spack.spec.Spec): the spec whose install record is being updated explicit (bool): ``True`` if the package was requested explicitly by the user, ``False`` if it was pulled in as a dependency of an explicit package. diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index d9195d9ecdd..91deedbb5af 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -54,7 +54,7 @@ class OpenMpi(Package): from collections import Sequence -__all__ = [] +__all__ = ['DirectiveError', 'DirectiveMeta'] #: These are variant names used by Spack internally; packages can't use them reserved_names = ['patches', 'dev_path'] @@ -85,7 +85,7 @@ def make_when_spec(value): as part of concretization. Arguments: - value (Spec or bool): a conditional Spec or a constant ``bool`` + value (spack.spec.Spec or bool): a conditional Spec or a constant ``bool`` value indicating when a directive should be applied. """ @@ -187,12 +187,16 @@ def directive(dicts=None): Here's an example directive: + .. code-block:: python + @directive(dicts='versions') version(pkg, ...): ... This directive allows you write: + .. code-block:: python + class Foo(Package): version(...) @@ -392,8 +396,8 @@ def conflicts(conflict_spec, when=None, msg=None): conflicts('%intel', when='+foo') Args: - conflict_spec (Spec): constraint defining the known conflict - when (Spec): optional constraint that triggers the conflict + conflict_spec (spack.spec.Spec): constraint defining the known conflict + when (spack.spec.Spec): optional constraint that triggers the conflict msg (str): optional user defined message """ def _execute_conflicts(pkg): @@ -413,11 +417,11 @@ def depends_on(spec, when=None, type=default_deptype, patches=None): """Creates a dict of deps with specs defining when they apply. Args: - spec (Spec or str): the package and constraints depended on - when (Spec or str): when the dependent satisfies this, it has + spec (spack.spec.Spec or str): the package and constraints depended on + when (spack.spec.Spec or str): when the dependent satisfies this, it has the dependency represented by ``spec`` - type (str or tuple of str): str or tuple of legal Spack deptypes - patches (obj or list): single result of ``patch()`` directive, a + type (str or tuple): str or tuple of legal Spack deptypes + patches (typing.Callable or list): single result of ``patch()`` directive, a ``str`` to be passed to ``patch``, or a list of these This directive is to be used inside a Package definition to declare @@ -495,7 +499,7 @@ def patch(url_or_filename, level=1, when=None, working_dir=".", **kwargs): Args: url_or_filename (str): url or relative filename of the patch level (int): patch level (as in the patch shell command) - when (Spec): optional anonymous spec that specifies when to apply + when (spack.spec.Spec): optional anonymous spec that specifies when to apply the patch working_dir (str): dir to change to before applying @@ -559,12 +563,12 @@ def variant( specified otherwise the default will be False for a boolean variant and 'nothing' for a multi-valued variant description (str): description of the purpose of the variant - values (tuple or callable): either a tuple of strings containing the + values (tuple or typing.Callable): either a tuple of strings containing the allowed values, or a callable accepting one value and returning True if it is valid multi (bool): if False only one value per spec is allowed for this variant - validator (callable): optional group validator to enforce additional + validator (typing.Callable): optional group validator to enforce additional logic. It receives the package name, the variant name and a tuple of values and should raise an instance of SpackError if the group doesn't meet the additional constraints diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index c41d567bce1..f2ed7f39b08 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -116,11 +116,12 @@ def activate( use_env_repo (bool): use the packages exactly as they appear in the environment's repository add_view (bool): generate commands to add view to path variables - shell (string): One of `sh`, `csh`, `fish`. - prompt (string): string to add to the users prompt, or None + shell (str): One of `sh`, `csh`, `fish`. + prompt (str): string to add to the users prompt, or None Returns: - cmds: Shell commands to activate environment. + str: Shell commands to activate environment. + TODO: environment to use the activated spack environment. """ global _active_environment @@ -198,10 +199,10 @@ def deactivate(shell='sh'): """Undo any configuration or repo settings modified by ``activate()``. Arguments: - shell (string): One of `sh`, `csh`, `fish`. Shell style to use. + shell (str): One of `sh`, `csh`, `fish`. Shell style to use. Returns: - (string): shell commands for `shell` to undo environment variables + str: shell commands for `shell` to undo environment variables """ global _active_environment @@ -272,7 +273,7 @@ def find_environment(args): If an environment is found, read it in. If not, return None. Arguments: - args (Namespace): argparse namespace wtih command arguments + args (argparse.Namespace): argparse namespace wtih command arguments Returns: (Environment): a found environment, or ``None`` @@ -322,7 +323,7 @@ def get_env(args, cmd_name, required=False): message that says the calling command *needs* an active environment. Arguments: - args (Namespace): argparse namespace wtih command arguments + args (argparse.Namespace): argparse namespace wtih command arguments cmd_name (str): name of calling command required (bool): if ``True``, raise an exception when no environment is found; if ``False``, just return ``None`` @@ -550,7 +551,7 @@ def view(self, new=None): Raise if new is None and there is no current view Arguments: - new (string or None): If a string, create a FilesystemView + new (str or None): If a string, create a FilesystemView rooted at that path. Default None. This should only be used to regenerate the view, and cannot be used to access specs. """ @@ -851,7 +852,7 @@ def clear(self, re_read=False): """Clear the contents of the environment Arguments: - re_read (boolean): If True, do not clear ``new_specs`` nor + re_read (bool): If True, do not clear ``new_specs`` nor ``new_installs`` values. These values cannot be read from yaml, and need to be maintained when re-reading an existing environment. @@ -1119,11 +1120,11 @@ def develop(self, spec, path, clone=False): """Add dev-build info for package Args: - spec (Spec): Set constraints on development specs. Must include a + spec (spack.spec.Spec): Set constraints on development specs. Must include a concrete version. - path (string): Path to find code for developer builds. Relative + path (str): Path to find code for developer builds. Relative paths will be resolved relative to the environment. - clone (bool, default False): Clone the package code to the path. + clone (bool): Clone the package code to the path. If clone is False Spack will assume the code is already present at ``path``. @@ -1552,7 +1553,7 @@ def install_all(self, args=None, **install_args): that needs to be done separately with a call to write(). Args: - args (Namespace): argparse namespace with command arguments + args (argparse.Namespace): argparse namespace with command arguments install_args (dict): keyword install arguments """ self.install_specs(None, args=args, **install_args) diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 3eee59349ee..f5eecdcb5d5 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -1254,8 +1254,9 @@ def __init__(self, **kwargs): @property def hg(self): - """:returns: The hg executable - :rtype: Executable + """ + Returns: + Executable: the hg executable """ if not self._hg: self._hg = which('hg', required=True) @@ -1405,7 +1406,7 @@ def from_kwargs(**kwargs): ``version()`` directive in a package. Returns: - fetch_strategy: The fetch strategy that matches the args, based + typing.Callable: The fetch strategy that matches the args, based on attribute names (e.g., ``git``, ``hg``, etc.) Raises: diff --git a/lib/spack/spack/install_test.py b/lib/spack/spack/install_test.py index 9142bb448c7..200eaed4ec7 100644 --- a/lib/spack/spack/install_test.py +++ b/lib/spack/spack/install_test.py @@ -28,7 +28,7 @@ def get_escaped_text_output(filename): filename (str): path to the file Returns: - (list of str): escaped text lines read from the file + list: escaped text lines read from the file """ with open(filename, 'r') as f: # Ensure special characters are escaped as needed diff --git a/lib/spack/spack/installer.py b/lib/spack/spack/installer.py index 0cbb71ef4b6..1d0b2212577 100644 --- a/lib/spack/spack/installer.py +++ b/lib/spack/spack/installer.py @@ -93,7 +93,7 @@ def _check_last_phase(pkg): package already. Args: - pkg (PackageBase): the package being installed + pkg (spack.package.PackageBase): the package being installed Raises: ``BadInstallPhase`` if stop_before or last phase is invalid @@ -115,10 +115,11 @@ def _handle_external_and_upstream(pkg, explicit): database if it is external package. Args: - pkg (Package): the package whose installation is under consideration + pkg (spack.package.Package): the package whose installation is under + consideration explicit (bool): the package was explicitly requested by the user Return: - (bool): ``True`` if the package is external or upstream (so not to + bool: ``True`` if the package is external or upstream (so not to be installed locally), otherwise, ``True`` """ # For external packages the workflow is simplified, and basically @@ -148,7 +149,7 @@ def _do_fake_install(pkg): and libraries. Args: - pkg (PackageBase): the package whose installation is to be faked + pkg (spack.package.PackageBase): the package whose installation is to be faked """ command = pkg.name @@ -194,15 +195,14 @@ def _packages_needed_to_bootstrap_compiler(compiler, architecture, pkgs): compiler (CompilerSpec): the compiler to bootstrap architecture (ArchSpec): the architecture for which to boostrap the compiler - pkgs (list of PackageBase): the packages that may need their compiler + pkgs (list): the packages that may need their compiler installed Return: - (list) list of tuples, (PackageBase, bool), for concretized compiler- - -related packages that need to be installed and bool values - specify whether the package is the bootstrap compiler - (``True``) or one of its dependencies (``False``). The list - will be empty if there are no compilers. + list: list of tuples, (PackageBase, bool), for concretized compiler-related + packages that need to be installed and bool values specify whether the + package is the bootstrap compiler (``True``) or one of its dependencies + (``False``). The list will be empty if there are no compilers. """ tty.debug('Bootstrapping {0} compiler'.format(compiler)) compilers = spack.compilers.compilers_for_spec( @@ -260,7 +260,7 @@ def _install_from_cache(pkg, cache_only, explicit, unsigned=False, Extract the package from binary cache Args: - pkg (PackageBase): the package to install from the binary cache + pkg (spack.package.PackageBase): the package to install from the binary cache cache_only (bool): only extract from binary cache explicit (bool): ``True`` if installing the package was explicitly requested by the user, otherwise, ``False`` @@ -268,7 +268,7 @@ def _install_from_cache(pkg, cache_only, explicit, unsigned=False, otherwise, ``False`` Return: - (bool) ``True`` if the package was extract from binary cache, + bool: ``True`` if the package was extract from binary cache, ``False`` otherwise """ installed_from_cache = _try_install_from_binary_cache( @@ -350,8 +350,8 @@ def _process_binary_cache_tarball(pkg, binary_spec, explicit, unsigned, Process the binary cache tarball. Args: - pkg (PackageBase): the package being installed - binary_spec (Spec): the spec whose cache has been confirmed + pkg (spack.package.PackageBase): the package being installed + binary_spec (spack.spec.Spec): the spec whose cache has been confirmed explicit (bool): the package was explicitly requested by the user unsigned (bool): ``True`` if binary package signatures to be checked, otherwise, ``False`` @@ -359,7 +359,7 @@ def _process_binary_cache_tarball(pkg, binary_spec, explicit, unsigned, attempting to download the tarball Return: - (bool) ``True`` if the package was extracted from binary cache, + bool: ``True`` if the package was extracted from binary cache, else ``False`` """ tarball = binary_distribution.download_tarball( @@ -385,7 +385,7 @@ def _try_install_from_binary_cache(pkg, explicit, unsigned=False, Try to extract the package from binary cache. Args: - pkg (PackageBase): the package to be extracted from binary cache + pkg (spack.package.PackageBase): the package to be extracted from binary cache explicit (bool): the package was explicitly requested by the user unsigned (bool): ``True`` if binary package signatures to be checked, otherwise, ``False`` @@ -423,7 +423,7 @@ def combine_phase_logs(phase_log_files, log_path): Args: phase_log_files (list): a list or iterator of logs to combine - log_path (path): the path to combine them to + log_path (str): the path to combine them to """ with open(log_path, 'w') as log_file: @@ -441,7 +441,7 @@ def dump_packages(spec, path): node in the DAG. Args: - spec (Spec): the Spack spec whose package information is to be dumped + spec (spack.spec.Spec): the Spack spec whose package information is to be dumped path (str): the path to the build packages directory """ fs.mkdirp(path) @@ -498,10 +498,10 @@ def get_dependent_ids(spec): Return a list of package ids for the spec's dependents Args: - spec (Spec): Concretized spec + spec (spack.spec.Spec): Concretized spec Returns: - (list of str): list of package ids + list: list of package ids """ return [package_id(d.package) for d in spec.dependents()] @@ -512,10 +512,10 @@ def install_msg(name, pid): Args: name (str): Name/id of the package being installed - pid (id): id of the installer process + pid (int): id of the installer process Return: - (str) Colorized installing message + str: Colorized installing message """ pre = '{0}: '.format(pid) if tty.show_pid() else '' return pre + colorize('@*{Installing} @*g{%s}' % name) @@ -526,7 +526,7 @@ def log(pkg): Copy provenance into the install directory on success Args: - pkg (Package): the package that was built and installed + pkg (spack.package.Package): the package that was built and installed """ packages_dir = spack.store.layout.build_packages_path(pkg.spec) @@ -608,7 +608,8 @@ def package_id(pkg): and packages for combinatorial environments. Args: - pkg (PackageBase): the package from which the identifier is derived + pkg (spack.package.PackageBase): the package from which the identifier is + derived """ if not pkg.spec.concrete: raise ValueError("Cannot provide a unique, readable id when " @@ -631,11 +632,11 @@ def __init__(self, installs=[]): """ Initialize the installer. Args: - installs (list of (pkg, install_args)): list of tuples, where each + installs (list): list of tuples, where each tuple consists of a package (PackageBase) and its associated install arguments (dict) Return: - (PackageInstaller) instance + PackageInstaller: instance """ # List of build requests self.build_requests = [BuildRequest(pkg, install_args) @@ -691,7 +692,8 @@ def _add_bootstrap_compilers( Args: compiler: the compiler to boostrap architecture: the architecture for which to bootstrap the compiler - pkgs (PackageBase): the package with possible compiler dependencies + pkgs (spack.package.PackageBase): the package with possible compiler + dependencies request (BuildRequest): the associated install request all_deps (defaultdict(set)): dictionary of all dependencies and associated dependents @@ -707,7 +709,7 @@ def _add_init_task(self, pkg, request, is_compiler, all_deps): Creates and queus the initial build task for the package. Args: - pkg (Package): the package to be built and installed + pkg (spack.package.Package): the package to be built and installed request (BuildRequest or None): the associated install request where ``None`` can be used to indicate the package was explicitly requested by the user @@ -726,7 +728,7 @@ def _check_db(self, spec): """Determine if the spec is flagged as installed in the database Args: - spec (Spec): spec whose database install status is being checked + spec (spack.spec.Spec): spec whose database install status is being checked Return: (rec, installed_in_db) tuple where rec is the database record, or @@ -887,7 +889,7 @@ def _cleanup_task(self, pkg): Cleanup the build task for the spec Args: - pkg (PackageBase): the package being installed + pkg (spack.package.PackageBase): the package being installed """ self._remove_task(package_id(pkg)) @@ -901,7 +903,7 @@ def _ensure_install_ready(self, pkg): already locked. Args: - pkg (PackageBase): the package being locally installed + pkg (spack.package.PackageBase): the package being locally installed """ pkg_id = package_id(pkg) pre = "{0} cannot be installed locally:".format(pkg_id) @@ -933,7 +935,7 @@ def _ensure_locked(self, lock_type, pkg): Args: lock_type (str): 'read' for a read lock, 'write' for a write lock - pkg (PackageBase): the package whose spec is being installed + pkg (spack.package.PackageBase): the package whose spec is being installed Return: (lock_type, lock) tuple where lock will be None if it could not @@ -1294,7 +1296,7 @@ def _setup_install_dir(self, pkg): Write a small metadata file with the current spack environment. Args: - pkg (Package): the package to be built and installed + pkg (spack.package.Package): the package to be built and installed """ if not os.path.exists(pkg.spec.prefix): tty.verbose('Creating the installation directory {0}' @@ -1369,9 +1371,9 @@ def _flag_installed(self, pkg, dependent_ids=None): known dependents. Args: - pkg (Package): Package that has been installed locally, externally - or upstream - dependent_ids (list of str or None): list of the package's + pkg (spack.package.Package): Package that has been installed locally, + externally or upstream + dependent_ids (list or None): list of the package's dependent ids, or None if the dependent ids are limited to those maintained in the package (dependency DAG) """ @@ -1422,7 +1424,7 @@ def install(self): Install the requested package(s) and or associated dependencies. Args: - pkg (Package): the package to be built and installed""" + pkg (spack.package.Package): the package to be built and installed""" self._init_queue() fail_fast_err = 'Terminating after first install failure' @@ -1833,7 +1835,7 @@ def __init__(self, pkg, request, compiler, start, attempts, status, Instantiate a build task for a package. Args: - pkg (Package): the package to be built and installed + pkg (spack.package.Package): the package to be built and installed request (BuildRequest or None): the associated install request where ``None`` can be used to indicate the package was explicitly requested by the user @@ -1841,7 +1843,7 @@ def __init__(self, pkg, request, compiler, start, attempts, status, start (int): the initial start time for the package, in seconds attempts (int): the number of attempts to install the package status (str): the installation status - installed (list of str): the identifiers of packages that have + installed (list): the identifiers of packages that have been installed so far """ @@ -1983,7 +1985,7 @@ def flag_installed(self, installed): Ensure the dependency is not considered to still be uninstalled. Args: - installed (list of str): the identifiers of packages that have + installed (list): the identifiers of packages that have been installed so far """ now_installed = self.uninstalled_deps & set(installed) @@ -2024,7 +2026,7 @@ def __init__(self, pkg, install_args): Instantiate a build request for a package. Args: - pkg (Package): the package to be built and installed + pkg (spack.package.Package): the package to be built and installed install_args (dict): the install arguments associated with ``pkg`` """ # Ensure dealing with a package that has a concrete spec @@ -2099,10 +2101,11 @@ def get_deptypes(self, pkg): """Determine the required dependency types for the associated package. Args: - pkg (PackageBase): explicit or implicit package being installed + pkg (spack.package.PackageBase): explicit or implicit package being + installed Returns: - (tuple) required dependency type(s) for the package + tuple: required dependency type(s) for the package """ deptypes = ['link', 'run'] include_build_deps = self.install_args.get('include_build_deps') @@ -2121,10 +2124,11 @@ def run_tests(self, pkg): """Determine if the tests should be run for the provided packages Args: - pkg (PackageBase): explicit or implicit package being installed + pkg (spack.package.PackageBase): explicit or implicit package being + installed Returns: - (bool) ``True`` if they should be run; ``False`` otherwise + bool: ``True`` if they should be run; ``False`` otherwise """ tests = self.install_args.get('tests', False) return tests is True or (tests and pkg.name in tests) diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index fcf6369df7f..d237db8904d 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -530,7 +530,7 @@ def __call__(self, *argv, **kwargs): """Invoke this SpackCommand. Args: - argv (list of str): command line arguments. + argv (list): command line arguments. Keyword Args: fail_on_error (optional bool): Don't raise an exception on error @@ -625,7 +625,7 @@ def print_setup_info(*info): """Print basic information needed by setup-env.[c]sh. Args: - info (list of str): list of things to print: comma-separated list + info (list): list of things to print: comma-separated list of 'csh', 'sh', or 'modules' This is in ``main.py`` to make it fast; the setup scripts need to @@ -689,7 +689,7 @@ def main(argv=None): """This is the entry point for the Spack command. Args: - argv (list of str or None): command line arguments, NOT including + argv (list or None): command line arguments, NOT including the executable name. If None, parses from sys.argv. """ # Create a parser with a simple positional argument first. We'll diff --git a/lib/spack/spack/mixins.py b/lib/spack/spack/mixins.py index 596aabebecb..7a3c03d4e3c 100644 --- a/lib/spack/spack/mixins.py +++ b/lib/spack/spack/mixins.py @@ -19,7 +19,8 @@ import llnl.util.filesystem __all__ = [ - 'filter_compiler_wrappers' + 'filter_compiler_wrappers', + 'PackageMixinsMeta', ] diff --git a/lib/spack/spack/modules/lmod.py b/lib/spack/spack/modules/lmod.py index 38b1dd1705b..0dcd78c20c5 100644 --- a/lib/spack/spack/modules/lmod.py +++ b/lib/spack/spack/modules/lmod.py @@ -30,7 +30,7 @@ def configuration(module_set_name): return config -#: Caches the configuration {spec_hash: configuration} +# Caches the configuration {spec_hash: configuration} configuration_registry = {} # type: Dict[str, Any] diff --git a/lib/spack/spack/modules/tcl.py b/lib/spack/spack/modules/tcl.py index 8b5e823e5e1..ee6e31a7eeb 100644 --- a/lib/spack/spack/modules/tcl.py +++ b/lib/spack/spack/modules/tcl.py @@ -29,7 +29,7 @@ def configuration(module_set_name): return config -#: Caches the configuration {spec_hash: configuration} +# Caches the configuration {spec_hash: configuration} configuration_registry = {} # type: Dict[str, Any] diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index e3299b3bdcd..2f63af13773 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -465,7 +465,7 @@ def test_log_pathname(test_stage, spec): Args: test_stage (str): path to the test stage directory - spec (Spec): instance of the spec under test + spec (spack.spec.Spec): instance of the spec under test Returns: (str): the pathname of the test log file @@ -725,14 +725,14 @@ def possible_dependencies( """Return dict of possible dependencies of this package. Args: - transitive (bool, optional): return all transitive dependencies if + transitive (bool or None): return all transitive dependencies if True, only direct dependencies if False (default True).. - expand_virtuals (bool, optional): expand virtual dependencies into + expand_virtuals (bool or None): expand virtual dependencies into all possible implementations (default True) - deptype (str or tuple, optional): dependency types to consider - visited (dicct, optional): dict of names of dependencies visited so + deptype (str or tuple or None): dependency types to consider + visited (dict or None): dict of names of dependencies visited so far, mapped to their immediate dependencies' names. - missing (dict, optional): dict to populate with packages and their + missing (dict or None): dict to populate with packages and their *missing* dependencies. virtuals (set): if provided, populate with virtuals seen so far. @@ -1756,7 +1756,7 @@ def cache_extra_test_sources(self, srcs): during install testing. Args: - srcs (str or list of str): relative path for files and or + srcs (str or list): relative path for files and or subdirectories located in the staged source path that are to be copied to the corresponding location(s) under the install testing directory. @@ -1803,10 +1803,10 @@ def run_test(self, exe, options=[], expected=[], status=0, Args: exe (str): the name of the executable - options (str or list of str): list of options to pass to the runner - expected (str or list of str): list of expected output strings. + options (str or list): list of options to pass to the runner + expected (str or list): list of expected output strings. Each string is a regex expected to match part of the output. - status (int or list of int): possible passing status values + status (int or list): possible passing status values with 0 meaning the test is expected to succeed installed (bool): if ``True``, the executable must be in the install prefix @@ -2010,9 +2010,9 @@ def setup_build_environment(self, env): Spack's store. Args: - env (EnvironmentModifications): environment modifications to be - applied when the package is built. Package authors can call - methods on it to alter the build environment. + env (spack.util.environment.EnvironmentModifications): environment + modifications to be applied when the package is built. Package authors + can call methods on it to alter the build environment. """ legacy_fn = self._get_legacy_environment_method('setup_environment') if legacy_fn: @@ -2023,9 +2023,9 @@ def setup_run_environment(self, env): """Sets up the run environment for a package. Args: - env (EnvironmentModifications): environment modifications to be - applied when the package is run. Package authors can call - methods on it to alter the run environment. + env (spack.util.environment.EnvironmentModifications): environment + modifications to be applied when the package is run. Package authors + can call methods on it to alter the run environment. """ legacy_fn = self._get_legacy_environment_method('setup_environment') if legacy_fn: @@ -2052,11 +2052,11 @@ def setup_dependent_build_environment(self, env, dependent_spec): variable. Args: - env (EnvironmentModifications): environment modifications to be - applied when the dependent package is built. Package authors - can call methods on it to alter the build environment. + env (spack.util.environment.EnvironmentModifications): environment + modifications to be applied when the dependent package is built. + Package authors can call methods on it to alter the build environment. - dependent_spec (Spec): the spec of the dependent package + dependent_spec (spack.spec.Spec): the spec of the dependent package about to be built. This allows the extendee (self) to query the dependent's state. Note that *this* package's spec is available as ``self.spec`` @@ -2079,11 +2079,11 @@ def setup_dependent_run_environment(self, env, dependent_spec): for dependencies. Args: - env (EnvironmentModifications): environment modifications to be - applied when the dependent package is run. Package authors - can call methods on it to alter the build environment. + env (spack.util.environment.EnvironmentModifications): environment + modifications to be applied when the dependent package is run. + Package authors can call methods on it to alter the build environment. - dependent_spec (Spec): The spec of the dependent package + dependent_spec (spack.spec.Spec): The spec of the dependent package about to be run. This allows the extendee (self) to query the dependent's state. Note that *this* package's spec is available as ``self.spec`` @@ -2125,7 +2125,7 @@ def setup_dependent_package(self, module, dependent_spec): object of the dependent package. Packages can use this to set module-scope variables for the dependent to use. - dependent_spec (Spec): The spec of the dependent package + dependent_spec (spack.spec.Spec): The spec of the dependent package about to be built. This allows the extendee (self) to query the dependent's state. Note that *this* package's spec is available as ``self.spec``. diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py index 68691554f4d..a273514636d 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -28,7 +28,7 @@ def apply_patch(stage, patch_path, level=1, working_dir='.'): Args: stage (spack.stage.Stage): stage with code that will be patched patch_path (str): filesystem location for the patch to apply - level (int, optional): patch level (default 1) + level (int or None): patch level (default 1) working_dir (str): relative path *within* the stage to change to (default '.') """ diff --git a/lib/spack/spack/relocate.py b/lib/spack/spack/relocate.py index ef1d2e9456d..c6af4d96e73 100644 --- a/lib/spack/spack/relocate.py +++ b/lib/spack/spack/relocate.py @@ -869,7 +869,7 @@ def is_relocatable(spec): """Returns True if an installed spec is relocatable. Args: - spec (Spec): spec to be analyzed + spec (spack.spec.Spec): spec to be analyzed Returns: True if the binaries of an installed spec diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py index bb83fd4b5c4..2fb20d914ad 100644 --- a/lib/spack/spack/solver/asp.py +++ b/lib/spack/spack/solver/asp.py @@ -679,14 +679,14 @@ def condition(self, required_spec, imposed_spec=None, name=None): """Generate facts for a dependency or virtual provider condition. Arguments: - required_spec (Spec): the spec that triggers this condition - imposed_spec (optional, Spec): the sepc with constraints that + required_spec (spack.spec.Spec): the spec that triggers this condition + imposed_spec (spack.spec.Spec or None): the sepc with constraints that are imposed when this condition is triggered - name (optional, str): name for `required_spec` (required if + name (str or None): name for `required_spec` (required if required_spec is anonymous, ignored if not) Returns: - (int): id of the condition created by this function + int: id of the condition created by this function """ named_cond = required_spec.copy() named_cond.name = named_cond.name or name @@ -922,7 +922,7 @@ def spec_clauses(self, spec, body=False, transitive=True): """Return a list of clauses for a spec mandates are true. Arguments: - spec (Spec): the spec to analyze + spec (spack.spec.Spec): the spec to analyze body (bool): if True, generate clauses to be used in rule bodies (final values) instead of rule heads (setters). transitive (bool): if False, don't generate clauses from diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 934d3317fd8..af282e44254 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -122,7 +122,9 @@ __all__ = [ + 'CompilerSpec', 'Spec', + 'SpecParser', 'parse', 'SpecParseError', 'DuplicateDependencyError', @@ -143,7 +145,9 @@ 'AmbiguousHashError', 'InvalidHashError', 'NoSuchHashError', - 'RedundantSpecError'] + 'RedundantSpecError', + 'SpecDeprecatedError', +] #: Valid pattern for an identifier in Spack identifier_re = r'\w[\w-]*' @@ -1495,7 +1499,7 @@ def _spec_hash(self, hash): """Utility method for computing different types of Spec hashes. Arguments: - hash (SpecHashDescriptor): type of hash to generate. + hash (spack.hash_types.SpecHashDescriptor): type of hash to generate. """ # TODO: curently we strip build dependencies by default. Rethink # this when we move to using package hashing on all specs. @@ -1513,7 +1517,7 @@ def _cached_hash(self, hash, length=None): in the supplied attribute on this spec. Arguments: - hash (SpecHashDescriptor): type of hash to generate. + hash (spack.hash_types.SpecHashDescriptor): type of hash to generate. """ if not hash.attr: return self._spec_hash(hash)[:length] @@ -1615,7 +1619,7 @@ def to_node_dict(self, hash=ht.dag_hash): hashes). Arguments: - hash (SpecHashDescriptor) type of hash to generate. + hash (spack.hash_types.SpecHashDescriptor) type of hash to generate. """ d = syaml.syaml_dict() @@ -2987,7 +2991,7 @@ def ensure_valid_variants(spec): spec (Spec): spec to be analyzed Raises: - UnknownVariantError: on the first unknown variant found + spack.variant.UnknownVariantError: on the first unknown variant found """ pkg_cls = spec.package_class pkg_variants = pkg_cls.variants @@ -4437,6 +4441,7 @@ def __init__(self): class SpecParser(spack.parse.Parser): + """Parses specs.""" def __init__(self, initial_spec=None): """Construct a new SpecParser. diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index 1ca2ed5637a..e4d34a20df3 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -565,8 +565,9 @@ def cache_mirror(self, mirror, stats): """Perform a fetch if the resource is not already cached Arguments: - mirror (MirrorCache): the mirror to cache this Stage's resource in - stats (MirrorStats): this is updated depending on whether the + mirror (spack.caches.MirrorCache): the mirror to cache this Stage's + resource in + stats (spack.mirror.MirrorStats): this is updated depending on whether the caching operation succeeded or failed """ if isinstance(self.default_fetcher, fs.BundleFetchStrategy): @@ -835,7 +836,7 @@ def get_checksums_for_versions( Args: url_dict (dict): A dictionary of the form: version -> URL name (str): The name of the package - first_stage_function (callable): function that takes a Stage and a URL; + first_stage_function (typing.Callable): function that takes a Stage and a URL; this is run on the stage of the first URL downloaded keep_stage (bool): whether to keep staging area when command completes batch (bool): whether to ask user how many versions to fetch (false) diff --git a/lib/spack/spack/test/installer.py b/lib/spack/spack/test/installer.py index 76dddc9a4f1..485fbb1536b 100644 --- a/lib/spack/spack/test/installer.py +++ b/lib/spack/spack/test/installer.py @@ -65,7 +65,7 @@ def create_build_task(pkg, install_args={}): Create a built task for the given (concretized) package Args: - pkg (PackageBase): concretized package associated with the task + pkg (spack.package.PackageBase): concretized package associated with the task install_args (dict): dictionary of kwargs (or install args) Return: @@ -80,10 +80,10 @@ def create_installer(installer_args): Create an installer using the concretized spec for each arg Args: - installer_args (list of tuples): the list of (spec name, kwargs) tuples + installer_args (list): the list of (spec name, kwargs) tuples Return: - installer (PackageInstaller): the associated package installer + spack.installer.PackageInstaller: the associated package installer """ const_arg = [(spec.package, kwargs) for spec, kwargs in installer_args] return inst.PackageInstaller(const_arg) @@ -93,11 +93,11 @@ def installer_args(spec_names, kwargs={}): """Return a the installer argument with each spec paired with kwargs Args: - spec_names (list of str): list of spec names + spec_names (list): list of spec names kwargs (dict or None): install arguments to apply to all of the specs Returns: - list of (spec, kwargs): the installer constructor argument + list: list of (spec, kwargs), the installer constructor argument """ arg = [] for name in spec_names: diff --git a/lib/spack/spack/url.py b/lib/spack/spack/url.py index 770c5bd4c04..bfe74318f6b 100644 --- a/lib/spack/spack/url.py +++ b/lib/spack/spack/url.py @@ -417,11 +417,11 @@ def parse_version_offset(path): path (str): The filename or URL for the package Returns: - tuple of (Version, int, int, int, str): A tuple containing: + tuple: A tuple containing: version of the package, first index of version, length of version string, - the index of the matching regex + the index of the matching regex, the matching regex Raises: @@ -632,11 +632,11 @@ def parse_name_offset(path, v=None): v (str): The version of the package Returns: - tuple of (str, int, int, int, str): A tuple containing: + tuple: A tuple containing: name of the package, first index of name, length of name, - the index of the matching regex + the index of the matching regex, the matching regex Raises: @@ -774,9 +774,7 @@ def parse_name_and_version(path): path (str): The filename or URL for the package Returns: - tuple of (str, Version)A tuple containing: - The name of the package - The version of the package + tuple: a tuple containing the package (name, version) Raises: UndetectableVersionError: If the URL does not match any regexes diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py index 005c6351b59..23fb6529d87 100644 --- a/lib/spack/spack/user_environment.py +++ b/lib/spack/spack/user_environment.py @@ -18,7 +18,7 @@ def prefix_inspections(platform): """Get list of prefix inspections for platform Arguments: - platform (string): the name of the platform to consider. The platform + platform (str): the name of the platform to consider. The platform determines what environment variables Spack will use for some inspections. diff --git a/lib/spack/spack/util/editor.py b/lib/spack/spack/util/editor.py index 400c4eb63aa..02e59a45f03 100644 --- a/lib/spack/spack/util/editor.py +++ b/lib/spack/spack/util/editor.py @@ -64,7 +64,7 @@ def editor(*args, **kwargs): searching the full list above, we'll raise an error. Arguments: - args (list of str): args to pass to editor + args (list): args to pass to editor Optional Arguments: _exec_func (function): invoke this function instead of ``os.execv()`` diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index f33e3c0b8f9..073f60334e1 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -623,7 +623,7 @@ def from_sourcing_file(filename, *arguments, **kwargs): Args: filename (str): the file to be sourced - *arguments (list of str): arguments to pass on the command line + *arguments (list): arguments to pass on the command line Keyword Args: shell (str): the shell to use (default: ``bash``) @@ -867,7 +867,7 @@ def inspect_path(root, inspections, exclude=None): modifications are not performed immediately, but stored in a command object that is returned to client - exclude (callable): optional callable. If present it must accept an + exclude (typing.Callable): optional callable. If present it must accept an absolute path and return True if it should be excluded from the inspection @@ -920,7 +920,7 @@ def preserve_environment(*variables): explicitly unset on exit. Args: - variables (list of str): list of environment variables to be preserved + variables (list): list of environment variables to be preserved """ cache = {} for var in variables: @@ -1031,9 +1031,9 @@ def sanitize(environment, blacklist, whitelist): Args: environment (dict): input dictionary - blacklist (list of str): literals or regex patterns to be + blacklist (list): literals or regex patterns to be blacklisted - whitelist (list of str): literals or regex patterns to be + whitelist (list): literals or regex patterns to be whitelisted """ diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py index 084ca481471..1074a96cf7b 100644 --- a/lib/spack/spack/util/executable.py +++ b/lib/spack/spack/util/executable.py @@ -297,7 +297,7 @@ def which(*args, **kwargs): *args (str): One or more executables to search for Keyword Arguments: - path (:func:`list` or str): The path to search. Defaults to ``PATH`` + path (list or str): The path to search. Defaults to ``PATH`` required (bool): If set to True, raise an error if executable not found Returns: diff --git a/lib/spack/spack/util/imp/imp_importer.py b/lib/spack/spack/util/imp/imp_importer.py index a9b5cd641a4..d41d28928bb 100644 --- a/lib/spack/spack/util/imp/imp_importer.py +++ b/lib/spack/spack/util/imp/imp_importer.py @@ -28,11 +28,11 @@ def load_source(full_name, path, prepend=None): Args: full_name (str): full name of the module to be loaded path (str): path to the file that should be loaded - prepend (str, optional): some optional code to prepend to the + prepend (str or None): some optional code to prepend to the loaded module; e.g., can be used to inject import statements Returns: - (ModuleType): the loaded module + the loaded module """ with import_lock(): if prepend is None: diff --git a/lib/spack/spack/util/imp/importlib_importer.py b/lib/spack/spack/util/imp/importlib_importer.py index 4c8a2673e54..161e278e909 100644 --- a/lib/spack/spack/util/imp/importlib_importer.py +++ b/lib/spack/spack/util/imp/importlib_importer.py @@ -37,11 +37,11 @@ def load_source(full_name, path, prepend=None): Args: full_name (str): full name of the module to be loaded path (str): path to the file that should be loaded - prepend (str, optional): some optional code to prepend to the + prepend (str or None): some optional code to prepend to the loaded module; e.g., can be used to inject import statements Returns: - (ModuleType): the loaded module + the loaded module """ # use our custom loader loader = PrependFileLoader(full_name, path, prepend) diff --git a/lib/spack/spack/util/log_parse.py b/lib/spack/spack/util/log_parse.py index ccfde6d2794..11692b0afb5 100644 --- a/lib/spack/spack/util/log_parse.py +++ b/lib/spack/spack/util/log_parse.py @@ -20,7 +20,7 @@ def parse_log_events(stream, context=6, jobs=None, profile=False): """Extract interesting events from a log file as a list of LogEvent. Args: - stream (str or fileobject): build log name or file object + stream (str or typing.IO): build log name or file object context (int): lines of context to extract around each log event jobs (int): number of jobs to parse with; default ncpus profile (bool): print out profile information for parsing @@ -60,7 +60,7 @@ def make_log_context(log_events, width=None): """Get error context from a log file. Args: - log_events (list of LogEvent): list of events created by + log_events (list): list of events created by ``ctest_log_parser.parse()`` width (int or None): wrap width; ``0`` for no limit; ``None`` to auto-size for terminal diff --git a/lib/spack/spack/util/package_hash.py b/lib/spack/spack/util/package_hash.py index 05d7abe056a..bb9ad40e457 100644 --- a/lib/spack/spack/util/package_hash.py +++ b/lib/spack/spack/util/package_hash.py @@ -49,10 +49,10 @@ def is_directive(self, node): callbacks are sometimes represented). Args: - node (AST): the AST node being checked + node (ast.AST): the AST node being checked Returns: - (bool): ``True`` if the node represents a known directive, + bool: ``True`` if the node represents a known directive, ``False`` otherwise """ return (isinstance(node, ast.Expr) and diff --git a/lib/spack/spack/util/pattern.py b/lib/spack/spack/util/pattern.py index 655172886b7..0ddc51a1654 100644 --- a/lib/spack/spack/util/pattern.py +++ b/lib/spack/spack/util/pattern.py @@ -41,7 +41,7 @@ def composite(interface=None, method_list=None, container=list): interface (type): class exposing the interface to which the composite object must conform. Only non-private and non-special methods will be taken into account - method_list (list of str): names of methods that should be part + method_list (list): names of methods that should be part of the composite container (MutableSequence): container for the composite object (default = list). Must fulfill the MutableSequence diff --git a/lib/spack/spack/util/string.py b/lib/spack/spack/util/string.py index 6137c32d5a2..e132404e180 100644 --- a/lib/spack/spack/util/string.py +++ b/lib/spack/spack/util/string.py @@ -41,7 +41,7 @@ def plural(n, singular, plural=None, show_n=True): Arguments: n (int): number of things there are singular (str): singular form of word - plural (str, optional): optional plural form, for when it's not just + plural (str or None): optional plural form, for when it's not just singular + 's' show_n (bool): whether to include n in the result string (default True) diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index 4787e33dd68..34140ed74a0 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -367,7 +367,7 @@ def spider(root_urls, depth=0, concurrency=32): up to levels of links from each root. Args: - root_urls (str or list of str): root urls used as a starting point + root_urls (str or list): root urls used as a starting point for spidering depth (int): level of recursion into links concurrency (int): number of simultaneous requests that can be sent diff --git a/lib/spack/spack/variant.py b/lib/spack/spack/variant.py index 9b7d8779fe1..3badd30c202 100644 --- a/lib/spack/spack/variant.py +++ b/lib/spack/spack/variant.py @@ -94,8 +94,8 @@ def validate_or_raise(self, vspec, pkg=None): exception if any error is found. Args: - vspec (VariantSpec): instance to be validated - pkg (Package): the package that required the validation, + vspec (Variant): instance to be validated + pkg (spack.package.Package): the package that required the validation, if available Raises: @@ -254,7 +254,7 @@ def value(self): the variant. Returns: - tuple of str: values stored in the variant + tuple: values stored in the variant """ return self._value @@ -296,7 +296,7 @@ def copy(self): """Returns an instance of a variant equivalent to self Returns: - any variant type: a copy of self + AbstractVariant: a copy of self >>> a = MultiValuedVariant('foo', True) >>> b = a.copy() @@ -667,7 +667,7 @@ class DisjointSetsOfValues(Sequence): and therefore no other set can contain the item ``'none'``. Args: - *sets (list of tuples): mutually exclusive sets of values + *sets (list): mutually exclusive sets of values """ _empty_set = set(('none',)) From c56f2a935db03e7041bd88783149caffd0366adc Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 15 Jul 2021 23:09:39 -0500 Subject: [PATCH 123/289] Sphinx 3.4+ required for correct reference target linking --- lib/spack/docs/conf.py | 2 +- lib/spack/docs/requirements.txt | 2 +- lib/spack/docs/spack.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index 20a1ba86c54..5e2795cf49c 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -97,7 +97,7 @@ def setup(sphinx): # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = '1.8' +needs_sphinx = '3.4' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. diff --git a/lib/spack/docs/requirements.txt b/lib/spack/docs/requirements.txt index f5c50b01991..26787cfb1a2 100644 --- a/lib/spack/docs/requirements.txt +++ b/lib/spack/docs/requirements.txt @@ -1,7 +1,7 @@ # These dependencies should be installed using pip in order # to build the documentation. -sphinx +sphinx>=3.4 sphinxcontrib-programoutput sphinx-rtd-theme python-levenshtein diff --git a/lib/spack/docs/spack.yaml b/lib/spack/docs/spack.yaml index 69d0e301fdc..1ba1b616746 100644 --- a/lib/spack/docs/spack.yaml +++ b/lib/spack/docs/spack.yaml @@ -14,6 +14,6 @@ # spack: specs: - - py-sphinx + - "py-sphinx@3.4:" - py-sphinxcontrib-programoutput - py-sphinx-rtd-theme From 624c72afae6b46826eea4119ca096ef263e93067 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Fri, 16 Jul 2021 14:36:06 -0400 Subject: [PATCH 124/289] trilinos: simplify some variants (#24820) * trilinos: rename basker variant The Basker solver is part of amesos2 but is clearer without the extra scoping. * trilinos: automatically enable teuchos and remove variant Basically everything in trilinos needs teuchos * trilinos: group top-level dependencies * trilinos: update dependencies, removing unused - GLM, X11 are unused (x11 lacks dependency specs too) - Python variant is more like a TPL so rearrange that - Gtest internal package shouldn't be compiled or exported - Add MPI4PY requirement for pytrilinos * trilinos: remove package meta-options - XSDK settings and "all opt packages" are not used anywhere - all optional packages are dangerous * trilinos: Use hwloc iff kokkos See #19119, also the HWLOC tpl name was misspelled so this was being ignored before. * Flake * Fix trilinos +netcdf~mpi * trilinos: default to disabling external dependencies * Remove teuchos from downstream dependencies * fixup! trilinos: Use hwloc iff kokkos * Add netcdf requirements to packages with ^trilinos+exodus * trilinos: disable exodus by default * fixup! Add netcdf requirements to packages with ^trilinos+exodus * trilinos: only enable hwloc when @13: +kokkos * xyce: propagate trilinos dependencies more simply * dtk: fix missing boost dependency * trilinos: remove explicit metis dependency * trilinos: require metis/parmetis for zoltan Disable zoltan by default to minimize default dependencies * trilinos: mark mesquite disabled and fix kokkos arch * xsdk: fix trilinos to also list zoltan [with zoltan2] * ci: remove nonexistent variant from trilinos * trilinos: add missing boost dependency Co-authored-by: Satish Balay --- .../stacks/e4s-on-power/spack.yaml | 2 +- .../cloud_pipelines/stacks/e4s/spack.yaml | 2 +- .../builtin/packages/camellia/package.py | 2 +- .../packages/datatransferkit/package.py | 5 +- .../repos/builtin/packages/dealii/package.py | 11 +- .../builtin/packages/fortrilinos/package.py | 2 +- .../builtin/packages/nalu-wind/package.py | 18 +- .../repos/builtin/packages/nalu/package.py | 2 +- .../repos/builtin/packages/omega-h/package.py | 2 +- .../repos/builtin/packages/percept/package.py | 2 +- .../repos/builtin/packages/phist/package.py | 2 +- .../repos/builtin/packages/quinoa/package.py | 2 +- .../builtin/packages/trilinos/package.py | 250 ++++++++---------- .../repos/builtin/packages/xsdk/package.py | 12 +- .../repos/builtin/packages/xyce/package.py | 15 +- 15 files changed, 140 insertions(+), 189 deletions(-) diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml index fc0c5ef68e2..a131d8402ec 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s-on-power/spack.yaml @@ -283,7 +283,7 @@ spack: # - sz # - tasmanian # - tau - #- trilinos@13.0.1 +amesos +amesos2 +anasazi +aztec +belos +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +teuchos +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long + #- trilinos@13.0.1 +amesos +amesos2 +anasazi +aztec +belos +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +boost +superlu-dist gotype=long # - turbine # - umap # - unifyfs@0.9.1 diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 790bb341bb1..470f72259a2 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -284,7 +284,7 @@ spack: - sz - tasmanian - tau - - trilinos@13.0.1 +amesos +amesos2 +anasazi +aztec +belos +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +teuchos +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long + - trilinos@13.0.1 +amesos +amesos2 +anasazi +aztec +belos +epetra +epetraext +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +boost +superlu-dist gotype=long - turbine - umap - unifyfs@0.9.1 diff --git a/var/spack/repos/builtin/packages/camellia/package.py b/var/spack/repos/builtin/packages/camellia/package.py index 857fe5ec690..654c3a8dfba 100644 --- a/var/spack/repos/builtin/packages/camellia/package.py +++ b/var/spack/repos/builtin/packages/camellia/package.py @@ -20,7 +20,7 @@ class Camellia(CMakePackage): variant('moab', default=True, description='Compile with MOAB to include support for reading standard mesh formats') - depends_on('trilinos+amesos+amesos2+belos+epetra+epetraext+exodus+ifpack+ifpack2+intrepid+intrepid2+kokkos+ml+muelu+sacado+shards+teuchos+tpetra+zoltan+mumps+superlu-dist+hdf5+zlib+pnetcdf@master,12.12.1:') + depends_on('trilinos+amesos+amesos2+belos+epetra+epetraext+exodus+ifpack+ifpack2+intrepid+intrepid2+kokkos+ml+muelu+sacado+shards+tpetra+zoltan+mumps+superlu-dist+hdf5+zlib+mpi+netcdf+pnetcdf@master,12.12.1:') depends_on('moab@:4', when='+moab') # Cameilla needs hdf5 but the description "hdf5@:1.8" is diff --git a/var/spack/repos/builtin/packages/datatransferkit/package.py b/var/spack/repos/builtin/packages/datatransferkit/package.py index 8cc72a2da54..42698cc1722 100644 --- a/var/spack/repos/builtin/packages/datatransferkit/package.py +++ b/var/spack/repos/builtin/packages/datatransferkit/package.py @@ -27,9 +27,10 @@ class Datatransferkit(CMakePackage): description='enable the build of shared lib') depends_on('arborx@1.0:', when='+external-arborx') + depends_on('boost') depends_on('cmake', type='build') - depends_on('trilinos+intrepid2+shards~dtk', when='+serial') - depends_on('trilinos+intrepid2+shards+openmp~dtk', when='+openmp') + depends_on('trilinos+intrepid2+shards~dtk') + depends_on('trilinos+openmp', when='+openmp') depends_on('trilinos+stratimikos+belos', when='@master') depends_on('trilinos@13:13.99', when='@3.1-rc2') diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 644fd32eda3..7c34fc1d1a9 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -210,16 +210,11 @@ class Dealii(CMakePackage, CudaPackage): depends_on('symengine@0.6:', when='@9.2:+symengine') depends_on('tbb', when='+threads') # do not require +rol to make concretization of xsdk possible - depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos', - when='+trilinos+mpi~int64~cuda') - depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado+teuchos~hypre', - when='+trilinos+mpi+int64~cuda') + depends_on('trilinos+amesos+aztec+epetra+ifpack+ml+muelu+sacado', when='+trilinos') + depends_on('trilinos~hypre', when='+trilinos+int64') # TODO: temporary disable Tpetra when using CUDA due to # namespace "Kokkos::Impl" has no member "cuda_abort" - depends_on('trilinos@master+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2', - when='+trilinos+mpi~int64+cuda') - depends_on('trilinos@master+amesos+aztec+epetra+ifpack+ml+muelu+rol+sacado+teuchos~hypre~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2', - when='+trilinos+mpi+int64+cuda') + depends_on('trilinos@master+rol~amesos2~ifpack2~intrepid2~kokkos~tpetra~zoltan2', when='+trilinos+cuda') # Explicitly provide a destructor in BlockVector, # otherwise deal.II may fail to build with Intel compilers. diff --git a/var/spack/repos/builtin/packages/fortrilinos/package.py b/var/spack/repos/builtin/packages/fortrilinos/package.py index bd0da8b8e21..3e13fe156e2 100644 --- a/var/spack/repos/builtin/packages/fortrilinos/package.py +++ b/var/spack/repos/builtin/packages/fortrilinos/package.py @@ -55,7 +55,7 @@ class Fortrilinos(CMakePackage): depends_on('trilinos@12.17.1', when='@2.0.dev1') # Baseline trilinos dependencies - depends_on('trilinos+teuchos gotype=long_long') + depends_on('trilinos gotype=long_long') # Full trilinos dependencies depends_on('trilinos+amesos2+anasazi+belos+kokkos+ifpack2+muelu+nox+tpetra' '+stratimikos', when='+hl') diff --git a/var/spack/repos/builtin/packages/nalu-wind/package.py b/var/spack/repos/builtin/packages/nalu-wind/package.py index d845a6ea62f..203d69b8306 100644 --- a/var/spack/repos/builtin/packages/nalu-wind/package.py +++ b/var/spack/repos/builtin/packages/nalu-wind/package.py @@ -52,19 +52,21 @@ class NaluWind(CMakePackage, CudaPackage): depends_on('mpi') depends_on('yaml-cpp@0.5.3:') - depends_on('trilinos@master,develop ~cuda~wrapper+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+pnetcdf+shards~hypre cxxstd=14', when='~cuda') - # Cannot build Trilinos as a shared library with STK on Darwin - # https://github.com/trilinos/Trilinos/issues/2994 - depends_on('trilinos@master,develop ~cuda~wrapper+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+pnetcdf+shards~hypre~shared cxxstd=14', when=(sys.platform == 'darwin')) depends_on('openfast@master,develop +cxx', when='+openfast') depends_on('tioga@master,develop', when='+tioga') depends_on('hypre@develop,2.18.2: +int64+mpi~superlu-dist', when='+hypre') depends_on('kokkos-nvcc-wrapper', type='build', when='+cuda') + depends_on('trilinos@master,develop +exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+pnetcdf+shards~hypre cxxstd=14') + # Cannot build Trilinos as a shared library with STK on Darwin + # https://github.com/trilinos/Trilinos/issues/2994 + depends_on('trilinos~shared', when=(sys.platform == 'darwin')) + # Propagate cuda options to trilinos and hypre + depends_on('trilinos~cuda~wrapper', when='~cuda') + depends_on('trilinos+cuda+wrapper+cuda_rdc', when='+cuda') + depends_on('hypre@develop +cuda', when='+cuda') for _arch in CudaPackage.cuda_arch_values: - depends_on('trilinos@master,develop ~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+pnetcdf+shards~hypre+cuda+cuda_rdc+wrapper cxxstd=14 cuda_arch={0}'.format(_arch), - when='+cuda cuda_arch={0}'.format(_arch)) - depends_on('hypre@develop +mpi+cuda+int64~superlu-dist cuda_arch={0}'.format(_arch), - when='+hypre+cuda cuda_arch={0}'.format(_arch)) + depends_on('trilinos cuda_arch=' + _arch, when='+cuda cuda_arch=' + _arch) + depends_on('hypre cuda_arch=' + _arch, when='+hypre+cuda cuda_arch=' + _arch) depends_on('trilinos-catalyst-ioss-adapter', when='+catalyst') depends_on('fftw+mpi', when='+fftw') depends_on('boost cxxstd=14', when='+boost') diff --git a/var/spack/repos/builtin/packages/nalu/package.py b/var/spack/repos/builtin/packages/nalu/package.py index 44c8357d499..acda4934e68 100644 --- a/var/spack/repos/builtin/packages/nalu/package.py +++ b/var/spack/repos/builtin/packages/nalu/package.py @@ -35,7 +35,7 @@ class Nalu(CMakePackage): # Cannot build Trilinos as a shared library with STK on Darwin # which is why we have a 'shared' variant for Nalu # https://github.com/trilinos/Trilinos/issues/2994 - depends_on('trilinos+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre@master,develop', when='+shared') + depends_on('trilinos+mpi+netcdf+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre@master,develop', when='+shared') depends_on('trilinos~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre@master,develop', when='~shared') # Optional dependencies depends_on('tioga', when='+tioga+shared') diff --git a/var/spack/repos/builtin/packages/omega-h/package.py b/var/spack/repos/builtin/packages/omega-h/package.py index b5a01bfad5c..9fb8185edff 100644 --- a/var/spack/repos/builtin/packages/omega-h/package.py +++ b/var/spack/repos/builtin/packages/omega-h/package.py @@ -41,7 +41,7 @@ class OmegaH(CMakePackage): depends_on('gmsh', when='+examples', type='build') depends_on('mpi', when='+mpi') - depends_on('trilinos +kokkos +teuchos', when='+trilinos') + depends_on('trilinos +kokkos', when='+trilinos') depends_on('zlib', when='+zlib') # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86610 diff --git a/var/spack/repos/builtin/packages/percept/package.py b/var/spack/repos/builtin/packages/percept/package.py index a33c2f36673..99e204a7d29 100644 --- a/var/spack/repos/builtin/packages/percept/package.py +++ b/var/spack/repos/builtin/packages/percept/package.py @@ -25,7 +25,7 @@ class Percept(CMakePackage): depends_on('opennurbs@percept') depends_on('boost+graph+mpi') depends_on('yaml-cpp+pic~shared@0.5.3:') - depends_on('trilinos~shared+exodus+tpetra+epetra+epetraext+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+aztec+sacado~openmp+shards+intrepid+cgns@master,12.14.1:') + depends_on('trilinos~shared+exodus+netcdf+mpi+tpetra+epetra+epetraext+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+aztec+sacado~openmp+shards+intrepid+cgns@master,12.14.1:') def cmake_args(self): spec = self.spec diff --git a/var/spack/repos/builtin/packages/phist/package.py b/var/spack/repos/builtin/packages/phist/package.py index 9d1a40e5296..1883a3ec57b 100644 --- a/var/spack/repos/builtin/packages/phist/package.py +++ b/var/spack/repos/builtin/packages/phist/package.py @@ -124,7 +124,7 @@ class Phist(CMakePackage): depends_on('eigen', when='kernel_lib=eigen') depends_on('ghost', when='kernel_lib=ghost') - depends_on('trilinos+anasazi+belos+teuchos', when='+trilinos') + depends_on('trilinos+anasazi+belos', when='+trilinos') depends_on('parmetis+int64', when='+parmetis+int64') depends_on('parmetis~int64', when='+parmetis~int64') diff --git a/var/spack/repos/builtin/packages/quinoa/package.py b/var/spack/repos/builtin/packages/quinoa/package.py index 8b3996181d5..aabda89fac5 100644 --- a/var/spack/repos/builtin/packages/quinoa/package.py +++ b/var/spack/repos/builtin/packages/quinoa/package.py @@ -21,7 +21,7 @@ class Quinoa(CMakePackage): depends_on('hdf5+mpi') depends_on("charmpp backend=mpi") - depends_on("trilinos+exodus") + depends_on("trilinos+exodus+mpi+netcdf") depends_on("boost") depends_on("hypre~internal-superlu") depends_on("random123") diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 42b8011e230..85dafa076f5 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -60,8 +60,6 @@ class Trilinos(CMakePackage, CudaPackage): # Other # not everyone has py-numpy activated, keep it disabled by default to avoid # configure errors - variant('python', default=False, - description='Build python wrappers') # Build options variant('complex', default=False, @@ -76,50 +74,42 @@ class Trilinos(CMakePackage, CudaPackage): description='global ordinal type for Tpetra') variant('fortran', default=True, description='Compile with Fortran support') + variant('python', default=False, + description='Build PyTrilinos wrappers') variant('wrapper', default=False, description="Use nvcc-wrapper for CUDA build") variant('cuda_rdc', default=False, description='turn on RDC for CUDA build') variant('cxxstd', default='11', values=['11', '14', '17'], multi=False) - variant('hwloc', default=False, - description='Enable hwloc') variant('openmp', default=False, description='Enable OpenMP') variant('shared', default=True, description='Enables the build of shared libraries') variant('debug', default=False, description='Enable runtime safety and debug checks') - variant('xsdkflags', default=False, - description='Compile using the default xSDK configuration') # TPLs (alphabet order) - variant('boost', default=True, + variant('boost', default=False, description='Compile with Boost') variant('cgns', default=False, description='Enable CGNS') variant('adios2', default=False, description='Enable ADIOS2') - variant('glm', default=True, - description='Compile with GLM') - variant('gtest', default=False, - description='Compile with Gtest') - variant('hdf5', default=True, + variant('hdf5', default=False, description='Compile with HDF5') - variant('hypre', default=True, + variant('hypre', default=False, description='Compile with Hypre preconditioner') - variant('matio', default=True, + variant('matio', default=False, description='Compile with Matio') - variant('metis', default=True, - description='Compile with METIS and ParMETIS') variant('mpi', default=True, description='Compile with MPI parallelism') - variant('mumps', default=True, + variant('mumps', default=False, description='Compile with support for MUMPS solvers') - variant('netcdf', default=True, + variant('netcdf', default=False, description='Compile with netcdf') variant('pnetcdf', default=False, description='Compile with parallel-netcdf') - variant('suite-sparse', default=True, + variant('suite-sparse', default=False, description='Compile with SuiteSparse solvers') variant('superlu-dist', default=False, description='Compile with SuperluDist solvers') @@ -127,14 +117,10 @@ class Trilinos(CMakePackage, CudaPackage): description='Compile with SuperLU solvers') variant('strumpack', default=False, description='Compile with STRUMPACK solvers') - variant('x11', default=False, - description='Compile with X11') variant('zlib', default=False, description='Compile with zlib') # Package options (alphabet order) - variant('alloptpkgs', default=False, - description='Compile with all optional packages') variant('amesos', default=True, description='Compile with Amesos') variant('amesos2', default=True, @@ -154,7 +140,8 @@ class Trilinos(CMakePackage, CudaPackage): description='Compile with Epetra') variant('epetraext', default=True, description='Compile with EpetraExt') - variant('exodus', default=True, + # Disable Exodus by default as it requires netcdf + variant('exodus', default=False, description='Compile with Exodus from SEACAS') variant('ifpack', default=True, description='Compile with Ifpack') @@ -200,20 +187,18 @@ class Trilinos(CMakePackage, CudaPackage): description='Compile with Teko') variant('tempus', default=False, description='Compile with Tempus') - variant('teuchos', default=True, - description='Compile with Teuchos') variant('tpetra', default=True, description='Compile with Tpetra') variant('trilinoscouplings', default=False, description='Compile with TrilinosCouplings') - variant('zoltan', default=True, + variant('zoltan', default=False, description='Compile with Zoltan') - variant('zoltan2', default=True, + variant('zoltan2', default=False, description='Compile with Zoltan2') # Internal package options (alphabetical order) - variant('amesos2basker', default=False, - description='Compile with Basker in Amesos2') + variant('basker', default=False, + description='Compile with the Basker solver in Amesos2') variant('epetraextbtf', default=False, description='Compile with BTF in EpetraExt') variant('epetraextexperimental', default=False, @@ -223,11 +208,11 @@ class Trilinos(CMakePackage, CudaPackage): # External package options variant('dtk', default=False, - description='Enable DataTransferKit') + description='Enable DataTransferKit (deprecated)') variant('scorec', default=False, description='Enable SCOREC') variant('mesquite', default=False, - description='Enable Mesquite') + description='Enable Mesquite (deprecated)') resource(name='dtk', git='https://github.com/ornl-cees/DataTransferKit.git', @@ -267,71 +252,58 @@ class Trilinos(CMakePackage, CudaPackage): placement='packages/mesquite', when='+mesquite @develop') - conflicts('+amesos2', when='~teuchos') - conflicts('+amesos2', when='~tpetra') - conflicts('+amesos', when='~epetra') - conflicts('+amesos', when='~teuchos') - conflicts('+anasazi', when='~teuchos') - conflicts('+aztec', when='~epetra') - conflicts('+belos', when='~teuchos') - conflicts('+epetraext', when='~epetra') - conflicts('+epetraext', when='~teuchos') - conflicts('+exodus', when='~netcdf') - conflicts('+ifpack2', when='~belos') - conflicts('+ifpack2', when='~teuchos') - conflicts('+ifpack2', when='~tpetra') - conflicts('+ifpack', when='~epetra') - conflicts('+ifpack', when='~teuchos') - conflicts('+intrepid2', when='~kokkos') - conflicts('+intrepid2', when='~shards') - conflicts('+intrepid2', when='~teuchos') - conflicts('+intrepid', when='~sacado') - conflicts('+intrepid', when='~shards') - conflicts('+intrepid', when='~teuchos') - conflicts('+isorropia', when='~epetra') - conflicts('+isorropia', when='~epetraext') - conflicts('+isorropia', when='~teuchos') - conflicts('+isorropia', when='~zoltan') - conflicts('+muelu', when='~teuchos') - conflicts('+nox', when='~teuchos') - conflicts('+phalanx', when='~kokkos') - conflicts('+phalanx', when='~sacado') - conflicts('+phalanx', when='~teuchos') - conflicts('+piro', when='~teuchos') - conflicts('+rol', when='~teuchos') - conflicts('+rythmos', when='~teuchos') + # Epetra packages + with when('~epetra'): + conflicts('+amesos') + conflicts('+aztec') + conflicts('+epetraext') + conflicts('+ifpack') + conflicts('+isorropia') + with when('~epetraext'): + conflicts('+isorropia') + conflicts('+teko') + conflicts('+epetraextbtf') + conflicts('+epetraextexperimental') + conflicts('+epetraextgraphreorderings') conflicts('+teko', when='~amesos') conflicts('+teko', when='~anasazi') conflicts('+teko', when='~aztec') - conflicts('+teko', when='~epetraext') conflicts('+teko', when='~ifpack') conflicts('+teko', when='~ml') + + # Tpetra packages + with when('~kokkos'): + conflicts('+cuda') + conflicts('+tpetra') + conflicts('+intrepid2') + conflicts('+phalanx') + with when('~tpetra'): + conflicts('+amesos2') + conflicts('+dtk') + conflicts('+ifpack2') + conflicts('+teko') + conflicts('+zoltan2') + + conflicts('+basker', when='~amesos2') + conflicts('+exodus', when='~netcdf') + conflicts('+ifpack2', when='~belos') + conflicts('+intrepid', when='~sacado') + conflicts('+intrepid', when='~shards') + conflicts('+intrepid2', when='~shards') + conflicts('+isorropia', when='~zoltan') + conflicts('+phalanx', when='~sacado') conflicts('+teko', when='~stratimikos') - conflicts('+teko', when='~teuchos') - conflicts('+teko', when='~tpetra') conflicts('+teko', when='@:12 gotype=long') conflicts('+tempus', when='~nox') - conflicts('+tempus', when='~teuchos') - conflicts('+tpetra', when='~kokkos') - conflicts('+tpetra', when='~teuchos') - conflicts('+zoltan2', when='~teuchos') - conflicts('+zoltan2', when='~tpetra') conflicts('+zoltan2', when='~zoltan') - conflicts('+epetraextbtf', when='~epetraext') - conflicts('+epetraextexperimental', when='~epetraext') - conflicts('+epetraextgraphreorderings', when='~epetraext') - conflicts('+amesos2basker', when='~amesos2') - + # Only allow DTK with Trilinos 12.14 and develop conflicts('+dtk', when='~boost') conflicts('+dtk', when='~intrepid2') - conflicts('+dtk', when='~kokkos') - conflicts('+dtk', when='~teuchos') - conflicts('+dtk', when='~tpetra') - # Only allow DTK with Trilinos 12.14 and develop conflicts('+dtk', when='@0:12.12.99,master') + # Only allow Mesquite with Trilinos 12.12 and up, and develop - conflicts('+mesquite', when='@0:12.10.99,master') + conflicts('+mesquite', when='@0:12.10.99,master,develop') # Can only use one type of SuperLU conflicts('+superlu-dist', when='+superlu') # For Trilinos v11 we need to force SuperLUDist=OFF, since only the @@ -346,7 +318,6 @@ class Trilinos(CMakePackage, CudaPackage): # https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html conflicts('+superlu-dist', when='+complex+amesos2') conflicts('+strumpack', when='@:13.0.99') - conflicts('+strumpack', when='~metis') # PnetCDF was only added after v12.10.1 conflicts('+pnetcdf', when='@0:12.10.1') # https://github.com/trilinos/Trilinos/issues/2994 @@ -366,8 +337,7 @@ class Trilinos(CMakePackage, CudaPackage): conflicts('cxxstd=14', when='+wrapper ^cuda@6.5.14:8.0.61') conflicts('cxxstd=17', when='+wrapper ^cuda@6.5.14:10.2.89') - # SCOREC requires parmetis, shards, stk, and zoltan - conflicts('+scorec', when='~metis') + # SCOREC requires shards, stk, and zoltan conflicts('+scorec', when='~mpi') conflicts('+scorec', when='~shards') conflicts('+scorec', when='~stk') @@ -385,26 +355,27 @@ class Trilinos(CMakePackage, CudaPackage): # ###################### Dependencies ########################## - # Everything should be compiled position independent (-fpic) depends_on('blas') depends_on('lapack') depends_on('boost', when='+boost') - depends_on('glm', when='+glm') depends_on('hdf5+hl', when='+hdf5') depends_on('matio', when='+matio') - depends_on('metis@5:', when='+metis') depends_on('suite-sparse', when='+suite-sparse') depends_on('zlib', when="+zlib") # MPI related dependencies depends_on('mpi', when='+mpi') depends_on('hdf5+mpi', when="+hdf5+mpi") + depends_on('netcdf-c', when="+netcdf") depends_on('netcdf-c+mpi', when="+netcdf~pnetcdf+mpi") depends_on('netcdf-c+mpi+parallel-netcdf', when="+netcdf+pnetcdf@master,12.12.1:") depends_on('parallel-netcdf', when="+netcdf+pnetcdf@master,12.12.1:") - depends_on('parmetis', when='+metis+mpi') + depends_on('metis', when='+zoltan') + depends_on('parmetis', when='+mpi +zoltan') + depends_on('parmetis', when='+scorec') depends_on('cgns', when='+cgns') depends_on('adios2', when='+adios2') + depends_on('boost', when='+minitensor') # Trilinos' Tribits config system is limited which makes it very tricky to # link Amesos with static MUMPS, see # https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html @@ -430,11 +401,12 @@ class Trilinos(CMakePackage, CudaPackage): depends_on('hypre@xsdk-0.2.0~internal-superlu', when='@xsdk-0.2.0+hypre') depends_on('hypre@develop~internal-superlu', when='@develop+hypre') depends_on('python', when='+python') + depends_on('py-mpi4py', when='+mpi +python', type=('build', 'run')) depends_on('py-numpy', when='+python', type=('build', 'run')) depends_on('swig', when='+python') depends_on('kokkos-nvcc-wrapper', when='+wrapper') - depends_on('hwloc', when='+hwloc') - depends_on('hwloc +cuda', when='+hwloc+cuda') + depends_on('hwloc', when='@13: +kokkos') + depends_on('hwloc+cuda', when='@13: +kokkos+cuda') # Dependencies/conflicts when MPI is disabled depends_on('hdf5~mpi', when='+hdf5~mpi') @@ -493,24 +465,17 @@ def setup_build_environment(self, env): def cmake_args(self): spec = self.spec define = CMakePackage.define + define_from_variant = self.define_from_variant def define_trilinos_enable(cmake_var, spec_var=None): if spec_var is None: spec_var = cmake_var.lower() - return self.define_from_variant( - 'Trilinos_ENABLE_' + cmake_var, spec_var) + return define_from_variant('Trilinos_ENABLE_' + cmake_var, spec_var) def define_tpl_enable(cmake_var, spec_var=None): if spec_var is None: spec_var = cmake_var.lower() - return self.define_from_variant('TPL_ENABLE_' + cmake_var, - spec_var) - - def define_prefix_enable(prefix, cmake_var, spec_var=None): - if spec_var is None: - spec_var = cmake_var.lower() - return self.define_from_variant( - '%s' % prefix, spec_var) + return define_from_variant('TPL_ENABLE_' + cmake_var, spec_var) cxx_flags = [] options = [] @@ -522,15 +487,14 @@ def define_prefix_enable(prefix, cmake_var, spec_var=None): define('Trilinos_ENABLE_TESTS', False), define('Trilinos_ENABLE_EXAMPLES', False), define('Trilinos_ENABLE_CXX11', True), - self.define_from_variant('BUILD_SHARED_LIBS', 'shared'), + define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"), + define_from_variant('BUILD_SHARED_LIBS', 'shared'), define_trilinos_enable('DEBUG', 'debug'), # The following can cause problems on systems that don't have # static libraries available for things like dl and pthreads # for example when trying to build static libs - # define('TPL_FIND_SHARED_LIBS', ( - # 'ON' if '+shared' in spec else 'OFF')) - # define('Trilinos_LINK_SEARCH_START_STATIC', ( - # 'OFF' if '+shared' in spec else 'ON')) + # define_from_variant('TPL_FIND_SHARED_LIBS', 'shared') + # define('Trilinos_LINK_SEARCH_START_STATIC', '+shared' not in spec) ]) # MPI settings @@ -549,7 +513,6 @@ def define_prefix_enable(prefix, cmake_var, spec_var=None): # ################## Trilinos Packages ##################### options.extend([ - define_trilinos_enable('ALL_OPTIONAL_PACKAGES', 'alloptpkgs'), define_trilinos_enable('Amesos'), define_trilinos_enable('Amesos2'), define_trilinos_enable('Anasazi'), @@ -582,22 +545,18 @@ def define_prefix_enable(prefix, cmake_var, spec_var=None): define_trilinos_enable('Stratimikos'), define_trilinos_enable('Teko'), define_trilinos_enable('Tempus'), - define_trilinos_enable('Teuchos'), define_trilinos_enable('Tpetra'), define_trilinos_enable('TrilinosCouplings'), define_trilinos_enable('Zoltan'), define_trilinos_enable('Zoltan2'), - define_prefix_enable('EpetraExt_BUILD_BTF', 'epetraextbtf'), - define_prefix_enable('EpetraExt_BUILD_EXPERIMENTAL', - 'epetraextexperimental'), - define_prefix_enable('EpetraExt_BUILD_GRAPH_REORDERINGS', - 'epetraextgraphreorderings'), - define_prefix_enable('Amesos2_ENABLE_Basker', 'amesos2basker'), + define_from_variant('EpetraExt_BUILD_BTF', 'epetraextbtf'), + define_from_variant('EpetraExt_BUILD_EXPERIMENTAL', + 'epetraextexperimental'), + define_from_variant('EpetraExt_BUILD_GRAPH_REORDERINGS', + 'epetraextgraphreorderings'), + define_from_variant('Amesos2_ENABLE_Basker', 'basker'), ]) - options.append(self.define_from_variant('USE_XSDK_DEFAULTS', - 'xsdkflags')) - if '+dtk' in spec: options.extend([ define('Trilinos_EXTRA_REPOSITORIES', 'DataTransferKit'), @@ -656,15 +615,9 @@ def define_prefix_enable(prefix, cmake_var, spec_var=None): define('TPL_ENABLE_LAPACK', True), define('LAPACK_LIBRARY_NAMES', lapack.names), define('LAPACK_LIBRARY_DIRS', lapack.directories), - define_tpl_enable('GLM'), define_tpl_enable('Matio'), - define_tpl_enable('X11'), - define_trilinos_enable('Gtest', 'gtest'), ]) - if '+hwloc' in spec: - options.append(define_tpl_enable('hwloc')) - options.append(define_tpl_enable('Netcdf')) if '+netcdf' in spec: options.append(define('NetCDF_ROOT', spec['netcdf-c'].prefix)) @@ -715,14 +668,22 @@ def define_prefix_enable(prefix, cmake_var, spec_var=None): define('TPL_ENABLE_UMFPACK', False), ]) - options.append(define_tpl_enable('METIS')) - options.append(define_tpl_enable('ParMETIS', 'metis')) - if '+metis' in spec: + # METIS and ParMETIS mostly depend on transitive dependencies + # STRUMPACK and SuperLU-dist, so don't provide a separate variant for + # them. + have_metis = 'metis' in spec + options.append(define('TPL_ENABLE_METIS', have_metis)) + if have_metis: options.extend([ define('METIS_LIBRARY_DIRS', spec['metis'].prefix.lib), define('METIS_LIBRARY_NAMES', 'metis'), define('TPL_METIS_INCLUDE_DIRS', spec['metis'].prefix.include), - define('TPL_ENABLE_ParMETIS', True), + ]) + + have_parmetis = 'parmetis' in spec + options.append(define('TPL_ENABLE_ParMETIS', have_parmetis)) + if have_parmetis: + options.extend([ define('ParMETIS_LIBRARY_DIRS', [ spec['parmetis'].prefix.lib, spec['metis'].prefix.lib ]), @@ -777,7 +738,6 @@ def define_prefix_enable(prefix, cmake_var, spec_var=None): options.append(define_tpl_enable('STRUMPACK')) if '+strumpack' in spec: options.extend([ - define('TPL_ENABLE_STRUMPACK', True), define('Amesos2_ENABLE_STRUMPACK', True), define('STRUMPACK_LIBRARY_DIRS', spec['strumpack'].libs.directories[0]), @@ -808,12 +768,13 @@ def define_prefix_enable(prefix, cmake_var, spec_var=None): define('CGNS_LIBRARY_DIRS', spec['cgns'].prefix.lib), ]) - options.append(self.define_from_variant('TPL_ENABLE_ADIOS2', 'adios2')) + options.append(define_from_variant('TPL_ENABLE_ADIOS2', 'adios2')) - options.append(define( - "Kokkos_ARCH_" + - Kokkos.spack_micro_arch_map[spec.target.name].upper(), - True)) + if '@13: +kokkos' in spec: + options.append(define('TPL_ENABLE_HWLOC', True)) + kkmarch = Kokkos.spack_micro_arch_map.get(spec.target.name, None) + if kkmarch: + options.append(define("Kokkos_ARCH_" + kkmarch.upper(), True)) # ################# Miscellaneous Stuff ###################### # CUDA @@ -835,10 +796,6 @@ def define_prefix_enable(prefix, cmake_var, spec_var=None): if '+wrapper' in spec: cxx_flags.extend(['--expt-extended-lambda']) - # Set the C++ standard to use - options.append(self.define_from_variant( - "CMAKE_CXX_STANDARD", "cxxstd")) - # OpenMP options.append(define_trilinos_enable('OpenMP')) if '+openmp' in spec: @@ -861,21 +818,20 @@ def define_prefix_enable(prefix, cmake_var, spec_var=None): '-L%s/ -lgfortran' % (libgfortran), )) - float_s = '+float' in spec - complex_s = '+complex' in spec - if '+teuchos' in spec: - options.extend([ - define('Teuchos_ENABLE_COMPLEX', complex_s), - define('Teuchos_ENABLE_FLOAT', float_s), - ]) - # Explicit Template Instantiation (ETI) in Tpetra # NOTE: Trilinos will soon move to fixed std::uint64_t for GO and # std::int32_t or std::int64_t for local. - options.append(self.define_from_variant( + options.append(define_from_variant( 'Trilinos_ENABLE_EXPLICIT_INSTANTIATION', 'explicit_template_instantiation')) + complex_s = spec.variants['complex'].value + float_s = spec.variants['float'].value + options.extend([ + define('Teuchos_ENABLE_COMPLEX', complex_s), + define('Teuchos_ENABLE_FLOAT', float_s), + ]) + if '+explicit_template_instantiation' in spec and '+tpetra' in spec: options.extend([ define('Tpetra_INST_DOUBLE', True), diff --git a/var/spack/repos/builtin/packages/xsdk/package.py b/var/spack/repos/builtin/packages/xsdk/package.py index c8f25ad5c91..2c9cde37d05 100644 --- a/var/spack/repos/builtin/packages/xsdk/package.py +++ b/var/spack/repos/builtin/packages/xsdk/package.py @@ -64,17 +64,17 @@ class Xsdk(BundlePackage): depends_on('superlu-dist@5.2.2', when='@0.3.0') depends_on('superlu-dist@xsdk-0.2.0', when='@xsdk-0.2.0') - depends_on('trilinos@develop+hypre+superlu-dist+metis+hdf5~mumps+boost~suite-sparse+tpetra+nox+ifpack2+zoltan2+amesos2~exodus~dtk+intrepid2+shards+stratimikos gotype=int cxxstd=14', + depends_on('trilinos@develop+hypre+superlu-dist+hdf5~mumps+boost~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2~exodus~dtk+intrepid2+shards+stratimikos gotype=int cxxstd=14', when='@develop +trilinos') - depends_on('trilinos@13.0.1+hypre+superlu-dist+metis+hdf5~mumps+boost~suite-sparse+tpetra+nox+ifpack2+zoltan2+amesos2~exodus~dtk+intrepid2+shards gotype=int', + depends_on('trilinos@13.0.1+hypre+superlu-dist+hdf5~mumps+boost~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2~exodus~dtk+intrepid2+shards gotype=int', when='@0.6.0 +trilinos') - depends_on('trilinos@12.18.1+hypre+superlu-dist+metis+hdf5~mumps+boost~suite-sparse+tpetra+nox+ifpack2+zoltan2+amesos2~exodus+dtk+intrepid2+shards', + depends_on('trilinos@12.18.1+hypre+superlu-dist+hdf5~mumps+boost~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2~exodus+dtk+intrepid2+shards', when='@0.5.0 +trilinos') - depends_on('trilinos@12.14.1+hypre+superlu-dist+metis+hdf5~mumps+boost~suite-sparse+tpetra+nox+ifpack2+zoltan2+amesos2~exodus+dtk+intrepid2+shards', + depends_on('trilinos@12.14.1+hypre+superlu-dist+hdf5~mumps+boost~suite-sparse+tpetra+nox+ifpack2+zoltan+zoltan2+amesos2~exodus+dtk+intrepid2+shards', when='@0.4.0 +trilinos') - depends_on('trilinos@12.12.1+hypre+superlu-dist+metis+hdf5~mumps+boost~suite-sparse~tpetra~ifpack2~zoltan2~amesos2~exodus', + depends_on('trilinos@12.12.1+hypre+superlu-dist+hdf5~mumps+boost~suite-sparse~tpetra~ifpack2~zoltan~zoltan2~amesos2~exodus', when='@0.3.0 +trilinos') - depends_on('trilinos@xsdk-0.2.0+hypre+superlu-dist+metis+hdf5~mumps+boost~suite-sparse~tpetra~ifpack2~zoltan2~amesos2~exodus', + depends_on('trilinos@xsdk-0.2.0+hypre+superlu-dist+hdf5~mumps+boost~suite-sparse~tpetra~ifpack2~zoltan~zoltan2~amesos2~exodus', when='@xsdk-0.2.0 +trilinos') depends_on('datatransferkit@master', when='@develop +trilinos +datatransferkit') diff --git a/var/spack/repos/builtin/packages/xyce/package.py b/var/spack/repos/builtin/packages/xyce/package.py index 1851d115ff6..494d8780f38 100644 --- a/var/spack/repos/builtin/packages/xyce/package.py +++ b/var/spack/repos/builtin/packages/xyce/package.py @@ -44,19 +44,16 @@ class Xyce(CMakePackage): # Xyce is built against an older version of Trilinos unlikely to be # used for any other purpose. - depends_on('trilinos@12.12.1 +amesos+amesos2+anasazi+aztec+belos+complex+epetra+epetraext+explicit_template_instantiation+fortran+hdf5+ifpack+isorropia+kokkos+nox+sacado+suite-sparse+teuchos+trilinoscouplings+zoltan+stokhos+amesos2basker+epetraextbtf+epetraextexperimental+epetraextgraphreorderings gotype=all') + depends_on('trilinos@12.12.1 +amesos+amesos2+anasazi+aztec+basker+belos+complex+epetra+epetraext+explicit_template_instantiation+fortran+hdf5+ifpack+isorropia+kokkos+nox+sacado+suite-sparse+trilinoscouplings+zoltan+stokhos+epetraextbtf+epetraextexperimental+epetraextgraphreorderings gotype=all') - # MPI options must be consistent with Trilinos - depends_on('trilinos~mpi', when='~mpi') - depends_on('trilinos+mpi', when='+mpi') + # Propagate variants to trilinos: + for _variant in ('mpi',): + depends_on('trilinos~' + _variant, when='~' + _variant) + depends_on('trilinos+' + _variant, when='+' + _variant) # The default settings for various Trilinos variants would require the # installation of many more packages than are needed for Xyce. - # The default variants in Trilinos have been set for several - # applications, namely xSDK, deal.ii, and DTK. Future changes to the - # Trilinos recipe will disable all packages by default. At that - # point, these ~variants can be removed from the following recipes. - depends_on('trilinos~adios2~alloptpkgs~boost~cgns~chaco~cuda~cuda_rdc~debug~dtk~exodus~float~glm~gtest~hwloc~hypre~ifpack2~intrepid~intrepid2~ipo~matio~mesquite~metis~minitensor~ml~muelu~mumps~netcdf~openmp~phalanx~piro~pnetcdf~python~rol~rythmos~shards~shared~shylu~stk~stratimikos~strumpack~superlu~superlu-dist~teko~tempus~wrapper~x11~xsdkflags~zlib~zoltan2') + depends_on('trilinos~float~ifpack2~ml~muelu~zoltan2') def cmake_args(self): spec = self.spec From 90da25e24ea9934225ba81f3f441312e474c00a2 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 19 Jul 2021 00:04:34 -0700 Subject: [PATCH 125/289] go: add v1.16.6 (#24934) --- .../repos/builtin/packages/go/package.py | 110 +++++++++--------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 9466dfe32f4..a8c4e15a531 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -35,52 +35,56 @@ class Go(Package): """The golang compiler and build environment""" homepage = "https://golang.org" - url = 'https://dl.google.com/go/go1.12.6.src.tar.gz' + url = "https://dl.google.com/go/go1.16.6.src.tar.gz" + git = "https://go.googlesource.com/go.git" extendable = True executables = ['^go$'] - version('1.16.5', sha256='7bfa7e5908c7cc9e75da5ddf3066d7cbcf3fd9fa51945851325eebc17f50ba80') - version('1.16.4', sha256='ae4f6b6e2a1677d31817984655a762074b5356da50fb58722b99104870d43503') - version('1.16.3', sha256='b298d29de9236ca47a023e382313bcc2d2eed31dfa706b60a04103ce83a71a25') - version('1.16.2', sha256='37ca14287a23cb8ba2ac3f5c3dd8adbc1f7a54b9701a57824bf19a0b271f83ea') - version('1.16', sha256='7688063d55656105898f323d90a79a39c378d86fe89ae192eb3b7fc46347c95a') + maintainers = ['alecbcs'] + + version('1.16.6', sha256='a3a5d4bc401b51db065e4f93b523347a4d343ae0c0b08a65c3423b05a138037d') + version('1.16.5', sha256='7bfa7e5908c7cc9e75da5ddf3066d7cbcf3fd9fa51945851325eebc17f50ba80') + version('1.16.4', sha256='ae4f6b6e2a1677d31817984655a762074b5356da50fb58722b99104870d43503') + version('1.16.3', sha256='b298d29de9236ca47a023e382313bcc2d2eed31dfa706b60a04103ce83a71a25') + version('1.16.2', sha256='37ca14287a23cb8ba2ac3f5c3dd8adbc1f7a54b9701a57824bf19a0b271f83ea') + version('1.16', sha256='7688063d55656105898f323d90a79a39c378d86fe89ae192eb3b7fc46347c95a') version('1.15.13', sha256='99069e7223479cce4553f84f874b9345f6f4045f27cf5089489b546da619a244') version('1.15.12', sha256='1c6911937df4a277fa74e7b7efc3d08594498c4c4adc0b6c4ae3566137528091') version('1.15.11', sha256='f25b2441d4c76cf63cde94d59bab237cc33e8a2a139040d904c8630f46d061e5') - version('1.15.8', sha256='540c0ab7781084d124991321ed1458e479982de94454a98afab6acadf38497c2') - version('1.15.7', sha256='8631b3aafd8ecb9244ec2ffb8a2a8b4983cf4ad15572b9801f7c5b167c1a2abc') - version('1.15.6', sha256='890bba73c5e2b19ffb1180e385ea225059eb008eb91b694875dd86ea48675817') - version('1.15.5', sha256='c1076b90cf94b73ebed62a81d802cd84d43d02dea8c07abdc922c57a071c84f1') - version('1.15.2', sha256='28bf9d0bcde251011caae230a4a05d917b172ea203f2a62f2c2f9533589d4b4d') - version('1.15.1', sha256='d3743752a421881b5cc007c76b4b68becc3ad053e61275567edab1c99e154d30') - version('1.15', sha256='69438f7ed4f532154ffaf878f3dfd83747e7a00b70b3556eddabf7aaee28ac3a') + version('1.15.8', sha256='540c0ab7781084d124991321ed1458e479982de94454a98afab6acadf38497c2') + version('1.15.7', sha256='8631b3aafd8ecb9244ec2ffb8a2a8b4983cf4ad15572b9801f7c5b167c1a2abc') + version('1.15.6', sha256='890bba73c5e2b19ffb1180e385ea225059eb008eb91b694875dd86ea48675817') + version('1.15.5', sha256='c1076b90cf94b73ebed62a81d802cd84d43d02dea8c07abdc922c57a071c84f1') + version('1.15.2', sha256='28bf9d0bcde251011caae230a4a05d917b172ea203f2a62f2c2f9533589d4b4d') + version('1.15.1', sha256='d3743752a421881b5cc007c76b4b68becc3ad053e61275567edab1c99e154d30') + version('1.15', sha256='69438f7ed4f532154ffaf878f3dfd83747e7a00b70b3556eddabf7aaee28ac3a') version('1.14.14', sha256='6204bf32f58fae0853f47f1bd0c51d9e0ac11f1ffb406bed07a0a8b016c8a76f') version('1.14.13', sha256='ba1d244c6b5c0ed04aa0d7856d06aceb89ed31b895de6ff783efb1cc8ab6b177') version('1.14.12', sha256='b34f4b7ad799eab4c1a52bdef253602ce957125a512f5a1b28dce43c6841b971') - version('1.14.9', sha256='c687c848cc09bcabf2b5e534c3fc4259abebbfc9014dd05a1a2dc6106f404554') - version('1.14.8', sha256='d9a613fb55f508cf84e753456a7c6a113c8265839d5b7fe060da335c93d6e36a') - version('1.14.6', sha256='73fc9d781815d411928eccb92bf20d5b4264797be69410eac854babe44c94c09') - version('1.14.5', sha256='ca4c080c90735e56152ac52cd77ae57fe573d1debb1a58e03da9cc362440315c') - version('1.14.4', sha256='7011af3bbc2ac108d1b82ea8abb87b2e63f78844f0259be20cde4d42c5c40584') - version('1.14.3', sha256='93023778d4d1797b7bc6a53e86c3a9b150c923953225f8a48a2d5fabc971af56') - version('1.14.2', sha256='98de84e69726a66da7b4e58eac41b99cbe274d7e8906eeb8a5b7eb0aadee7f7c') - version('1.14.1', sha256='2ad2572115b0d1b4cb4c138e6b3a31cee6294cb48af75ee86bec3dca04507676') - version('1.14', sha256='6d643e46ad565058c7a39dac01144172ef9bd476521f42148be59249e4b74389') + version('1.14.9', sha256='c687c848cc09bcabf2b5e534c3fc4259abebbfc9014dd05a1a2dc6106f404554') + version('1.14.8', sha256='d9a613fb55f508cf84e753456a7c6a113c8265839d5b7fe060da335c93d6e36a') + version('1.14.6', sha256='73fc9d781815d411928eccb92bf20d5b4264797be69410eac854babe44c94c09') + version('1.14.5', sha256='ca4c080c90735e56152ac52cd77ae57fe573d1debb1a58e03da9cc362440315c') + version('1.14.4', sha256='7011af3bbc2ac108d1b82ea8abb87b2e63f78844f0259be20cde4d42c5c40584') + version('1.14.3', sha256='93023778d4d1797b7bc6a53e86c3a9b150c923953225f8a48a2d5fabc971af56') + version('1.14.2', sha256='98de84e69726a66da7b4e58eac41b99cbe274d7e8906eeb8a5b7eb0aadee7f7c') + version('1.14.1', sha256='2ad2572115b0d1b4cb4c138e6b3a31cee6294cb48af75ee86bec3dca04507676') + version('1.14', sha256='6d643e46ad565058c7a39dac01144172ef9bd476521f42148be59249e4b74389') version('1.13.14', sha256='197333e97290e9ea8796f738d61019dcba1c377c2f3961fd6a114918ecc7ab06') version('1.13.13', sha256='ab7e44461e734ce1fd5f4f82c74c6d236e947194d868514d48a2b1ea73d25137') version('1.13.12', sha256='17ba2c4de4d78793a21cc659d9907f4356cd9c8de8b7d0899cdedcef712eba34') version('1.13.11', sha256='89ed1abce25ad003521c125d6583c93c1280de200ad221f961085200a6c00679') version('1.13.10', sha256='eb9ccc8bf59ed068e7eff73e154e4f5ee7eec0a47a610fb864e3332a2fdc8b8c') - version('1.13.9', sha256='34bb19d806e0bc4ad8f508ae24bade5e9fedfa53d09be63b488a9314d2d4f31d') - version('1.13.8', sha256='b13bf04633d4d8cf53226ebeaace8d4d2fd07ae6fa676d0844a688339debec34') - version('1.13.7', sha256='e4ad42cc5f5c19521fbbbde3680995f2546110b5c6aa2b48c3754ff7af9b41f4') - version('1.13.6', sha256='aae5be954bdc40bcf8006eb77e8d8a5dde412722bc8effcdaf9772620d06420c') - version('1.13.5', sha256='27d356e2a0b30d9983b60a788cf225da5f914066b37a6b4f69d457ba55a626ff') - version('1.13.4', sha256='95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624') - version('1.13.3', sha256='4f7123044375d5c404280737fbd2d0b17064b66182a65919ffe20ffe8620e3df') - version('1.13.2', sha256='1ea68e01472e4276526902b8817abd65cf84ed921977266f0c11968d5e915f44') - version('1.13.1', sha256='81f154e69544b9fa92b1475ff5f11e64270260d46e7e36c34aafc8bc96209358') + version('1.13.9', sha256='34bb19d806e0bc4ad8f508ae24bade5e9fedfa53d09be63b488a9314d2d4f31d') + version('1.13.8', sha256='b13bf04633d4d8cf53226ebeaace8d4d2fd07ae6fa676d0844a688339debec34') + version('1.13.7', sha256='e4ad42cc5f5c19521fbbbde3680995f2546110b5c6aa2b48c3754ff7af9b41f4') + version('1.13.6', sha256='aae5be954bdc40bcf8006eb77e8d8a5dde412722bc8effcdaf9772620d06420c') + version('1.13.5', sha256='27d356e2a0b30d9983b60a788cf225da5f914066b37a6b4f69d457ba55a626ff') + version('1.13.4', sha256='95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624') + version('1.13.3', sha256='4f7123044375d5c404280737fbd2d0b17064b66182a65919ffe20ffe8620e3df') + version('1.13.2', sha256='1ea68e01472e4276526902b8817abd65cf84ed921977266f0c11968d5e915f44') + version('1.13.1', sha256='81f154e69544b9fa92b1475ff5f11e64270260d46e7e36c34aafc8bc96209358') version('1.13', sha256='3fc0b8b6101d42efd7da1da3029c0a13f22079c0c37ef9730209d8ec665bf122') version('1.12.17', sha256='de878218c43aa3c3bad54c1c52d95e3b0e5d336e1285c647383e775541a28b25') version('1.12.15', sha256='8aba74417e527524ad5724e6e6c21016795d1017692db76d1b0851c6bdec84c3') @@ -89,31 +93,31 @@ class Go(Package): version('1.12.12', sha256='fcb33b5290fa9bcc52be3211501540df7483d7276b031fc77528672a3c705b99') version('1.12.11', sha256='fcf58935236802929f5726e96cd1d900853b377bec2c51b2e37219c658a4950f') version('1.12.10', sha256='f56e48fce80646d3c94dcf36d3e3f490f6d541a92070ad409b87b6bbb9da3954') - version('1.12.9', sha256='ab0e56ed9c4732a653ed22e232652709afbf573e710f56a07f7fdeca578d62fc') - version('1.12.8', sha256='11ad2e2e31ff63fcf8a2bdffbe9bfa2e1845653358daed593c8c2d03453c9898') - version('1.12.6', sha256='c96c5ccc7455638ae1a8b7498a030fe653731c8391c5f8e79590bce72f92b4ca') - version('1.12.5', sha256='2aa5f088cbb332e73fc3def546800616b38d3bfe6b8713b8a6404060f22503e8') + version('1.12.9', sha256='ab0e56ed9c4732a653ed22e232652709afbf573e710f56a07f7fdeca578d62fc') + version('1.12.8', sha256='11ad2e2e31ff63fcf8a2bdffbe9bfa2e1845653358daed593c8c2d03453c9898') + version('1.12.6', sha256='c96c5ccc7455638ae1a8b7498a030fe653731c8391c5f8e79590bce72f92b4ca') + version('1.12.5', sha256='2aa5f088cbb332e73fc3def546800616b38d3bfe6b8713b8a6404060f22503e8') version('1.11.13', sha256='5032095fd3f641cafcce164f551e5ae873785ce7b07ca7c143aecd18f7ba4076') version('1.11.11', sha256='1fff7c33ef2522e6dfaf6ab96ec4c2a8b76d018aae6fc88ce2bd40f2202d0f8c') version('1.11.10', sha256='df27e96a9d1d362c46ecd975f1faa56b8c300f5c529074e9ea79bdd885493c1b') - version('1.11.5', sha256='bc1ef02bb1668835db1390a2e478dcbccb5dd16911691af9d75184bbe5aa943e') - version('1.11.4', sha256='4cfd42720a6b1e79a8024895fa6607b69972e8e32446df76d6ce79801bbadb15') - version('1.11.2', sha256='042fba357210816160341f1002440550e952eb12678f7c9e7e9d389437942550') - version('1.11.1', sha256='558f8c169ae215e25b81421596e8de7572bd3ba824b79add22fba6e284db1117') - version('1.11', sha256='afc1e12f5fe49a471e3aae7d906c73e9d5b1fdd36d52d72652dde8f6250152fb') - version('1.10.3', sha256='567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2') - version('1.10.2', sha256='6264609c6b9cd8ed8e02ca84605d727ce1898d74efa79841660b2e3e985a98bd') - version('1.10.1', sha256='589449ff6c3ccbff1d391d4e7ab5bb5d5643a5a41a04c99315e55c16bbf73ddc') - version('1.9.5', sha256='f1c2bb7f32bbd8fa7a19cc1608e0d06582df32ff5f0340967d83fb0017c49fbc') - version('1.9.2', sha256='665f184bf8ac89986cfd5a4460736976f60b57df6b320ad71ad4cef53bb143dc') - version('1.9.1', sha256='a84afc9dc7d64fe0fa84d4d735e2ece23831a22117b50dafc75c1484f1cb550e') - version('1.9', sha256='a4ab229028ed167ba1986825751463605264e44868362ca8e7accc8be057e993') - version('1.8.3', sha256='5f5dea2447e7dcfdc50fa6b94c512e58bfba5673c039259fd843f68829d99fa6') - version('1.8.1', sha256='33daf4c03f86120fdfdc66bddf6bfff4661c7ca11c5da473e537f4d69b470e57') - version('1.8', sha256='406865f587b44be7092f206d73fc1de252600b79b3cacc587b74b5ef5c623596') - version('1.7.5', sha256='4e834513a2079f8cbbd357502cccaac9507fd00a1efe672375798858ff291815') - version('1.7.4', sha256='4c189111e9ba651a2bb3ee868aa881fab36b2f2da3409e80885ca758a6b614cc') - version('1.6.4', sha256='8796cc48217b59595832aa9de6db45f58706dae68c9c7fbbd78c9fdbe3cd9032') + version('1.11.5', sha256='bc1ef02bb1668835db1390a2e478dcbccb5dd16911691af9d75184bbe5aa943e') + version('1.11.4', sha256='4cfd42720a6b1e79a8024895fa6607b69972e8e32446df76d6ce79801bbadb15') + version('1.11.2', sha256='042fba357210816160341f1002440550e952eb12678f7c9e7e9d389437942550') + version('1.11.1', sha256='558f8c169ae215e25b81421596e8de7572bd3ba824b79add22fba6e284db1117') + version('1.11', sha256='afc1e12f5fe49a471e3aae7d906c73e9d5b1fdd36d52d72652dde8f6250152fb') + version('1.10.3', sha256='567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2') + version('1.10.2', sha256='6264609c6b9cd8ed8e02ca84605d727ce1898d74efa79841660b2e3e985a98bd') + version('1.10.1', sha256='589449ff6c3ccbff1d391d4e7ab5bb5d5643a5a41a04c99315e55c16bbf73ddc') + version('1.9.5', sha256='f1c2bb7f32bbd8fa7a19cc1608e0d06582df32ff5f0340967d83fb0017c49fbc') + version('1.9.2', sha256='665f184bf8ac89986cfd5a4460736976f60b57df6b320ad71ad4cef53bb143dc') + version('1.9.1', sha256='a84afc9dc7d64fe0fa84d4d735e2ece23831a22117b50dafc75c1484f1cb550e') + version('1.9', sha256='a4ab229028ed167ba1986825751463605264e44868362ca8e7accc8be057e993') + version('1.8.3', sha256='5f5dea2447e7dcfdc50fa6b94c512e58bfba5673c039259fd843f68829d99fa6') + version('1.8.1', sha256='33daf4c03f86120fdfdc66bddf6bfff4661c7ca11c5da473e537f4d69b470e57') + version('1.8', sha256='406865f587b44be7092f206d73fc1de252600b79b3cacc587b74b5ef5c623596') + version('1.7.5', sha256='4e834513a2079f8cbbd357502cccaac9507fd00a1efe672375798858ff291815') + version('1.7.4', sha256='4c189111e9ba651a2bb3ee868aa881fab36b2f2da3409e80885ca758a6b614cc') + version('1.6.4', sha256='8796cc48217b59595832aa9de6db45f58706dae68c9c7fbbd78c9fdbe3cd9032') provides('golang') From 99eb98d029a0efe58819775747eb6fdd7430f407 Mon Sep 17 00:00:00 2001 From: Lizzie Lundgren Date: Mon, 19 Jul 2021 04:53:02 -0400 Subject: [PATCH 126/289] gchp: add versions 13.1.0, 13.1.1, 13.1.2 (#24755) --- var/spack/repos/builtin/packages/gchp/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/gchp/package.py b/var/spack/repos/builtin/packages/gchp/package.py index 89e39591d16..6b5e7235365 100644 --- a/var/spack/repos/builtin/packages/gchp/package.py +++ b/var/spack/repos/builtin/packages/gchp/package.py @@ -12,10 +12,13 @@ class Gchp(CMakePackage): """GEOS-Chem High Performance model of atmospheric chemistry""" homepage = "https://gchp.readthedocs.io/" - url = "https://github.com/geoschem/GCHP/archive/13.0.1.tar.gz" + url = "https://github.com/geoschem/GCHP/archive/13.1.2.tar.gz" git = "https://github.com/geoschem/GCHP.git" - maintainers = ['williamdowns'] + maintainers = ['lizziel'] + version('13.1.2', commit='106b8f783cafabd699e53beec3a4dd8aee45234b', submodules=True) + version('13.1.1', commit='a17361a78aceab947ca51aa1ecd3391beaa3fcb2', submodules=True) + version('13.1.0', commit='4aca45370738e48623e61e38b26d981d3e20be76', submodules=True) version('13.0.2', commit='017ad7276a801ab7b3d6945ad24602eb9927cf01', submodules=True) version('13.0.1', commit='f40a2476fda901eacf78c0972fdb6c20e5a06700', submodules=True) version('13.0.0', commit='1f5a5c5630c5d066ff8306cbb8b83e267ca7c265', submodules=True) From fa503ef0e24d5fdd561f32b04e2256415b7624e8 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Mon, 19 Jul 2021 05:01:05 -0500 Subject: [PATCH 127/289] strumpack@develop: update change in examples/data PATH (#24814) --- var/spack/repos/builtin/packages/strumpack/package.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/strumpack/package.py b/var/spack/repos/builtin/packages/strumpack/package.py index b8cf21116be..e949db7dad7 100644 --- a/var/spack/repos/builtin/packages/strumpack/package.py +++ b/var/spack/repos/builtin/packages/strumpack/package.py @@ -147,11 +147,13 @@ def cmake_args(self): args.append('-DHIP_HIPCC_FLAGS=--amdgpu-target={0}'. format(",".join(rocm_archs))) + if self.spec.satisfies('@:5.1.1'): + self.test_data_dir = 'examples/data' + else: + self.test_data_dir = 'examples/sparse/data' + self.test_src_dir = 'test' return args - test_data_dir = 'examples/data' - test_src_dir = 'test' - @run_after('install') def cache_test_sources(self): """Copy the example source files after the package is installed to an @@ -185,7 +187,7 @@ def test(self): test_dir = join_path(self.install_test_root, self.test_src_dir) test_exe = 'test_sparse_seq' test_exe_mpi = 'test_sparse_mpi' - exe_arg = ['../../examples/data/pde900.mtx'] + exe_arg = [join_path('..', '..', self.test_data_dir, 'pde900.mtx')] if '+mpi' in self.spec: test_args = ['-n', '4', test_exe_mpi] test_args.extend(exe_arg) From b074dc17b1e098c732ddc1ea9ae3fffdfc1e578c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 19 Jul 2021 05:18:47 -0500 Subject: [PATCH 128/289] py-bandit: add new package (#24857) --- .../builtin/packages/py-bandit/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-bandit/package.py diff --git a/var/spack/repos/builtin/packages/py-bandit/package.py b/var/spack/repos/builtin/packages/py-bandit/package.py new file mode 100644 index 00000000000..f7408ec2802 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-bandit/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyBandit(PythonPackage): + """Security oriented static analyser for python code.""" + + homepage = "https://bandit.readthedocs.io/en/latest/" + pypi = "bandit/bandit-1.7.0.tar.gz" + + version('1.7.0', sha256='8a4c7415254d75df8ff3c3b15cfe9042ecee628a1e40b44c15a98890fbfc2608') + + depends_on('python@3.5:', type=('build', 'run')) + depends_on('py-pbr@2.0.0:', type='build') + depends_on('py-gitpython@1.0.1:', type=('build', 'run')) + depends_on('py-pyyaml@5.3.1:', type=('build', 'run')) + depends_on('py-six@1.10.0:', type=('build', 'run')) + depends_on('py-stevedore@1.20.0:', type=('build', 'run')) + depends_on('py-colorama@0.3.9:', when='platform=win32', type=('build', 'run')) From be90bdc355b4473d95ba823d654eecf82259c696 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 19 Jul 2021 05:22:03 -0500 Subject: [PATCH 129/289] py-rtree: add new version, fix runtime env (#24862) --- .../packages/libspatialindex/package.py | 13 +++++++++++-- .../builtin/packages/py-rtree/package.py | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/libspatialindex/package.py b/var/spack/repos/builtin/packages/libspatialindex/package.py index cc2ff83297c..151576143c3 100644 --- a/var/spack/repos/builtin/packages/libspatialindex/package.py +++ b/var/spack/repos/builtin/packages/libspatialindex/package.py @@ -10,6 +10,15 @@ class Libspatialindex(CMakePackage): """C++ implementation of R*-tree, an MVR-tree and a TPR-tree with C API.""" homepage = "https://libspatialindex.org/" - url = "https://github.com/libspatialindex/libspatialindex/tarball/1.8.5" + url = "https://github.com/libspatialindex/libspatialindex/archive/refs/tags/1.8.5.tar.gz" - version('1.8.5', sha256='271f0d1425c527fd7d8b4be45b27e9383b244047b5918225877105616e7c0ad2') + version('1.9.3', sha256='7b44340a3edc55c11abfc453bb60f148b29f569cef9e1148583e76132e9c7379') + version('1.8.5', sha256='93cce77269612f45287b521d5afdfb245be2b93b8b6438d92f8b9e0bdb37059d') + + depends_on('cmake@3.5.0:', type='build') + + @property + def libs(self): + return find_libraries( + ['libspatialindex_c'], root=self.prefix, recursive=True, shared=True + ) diff --git a/var/spack/repos/builtin/packages/py-rtree/package.py b/var/spack/repos/builtin/packages/py-rtree/package.py index ea156016983..4550ba88414 100644 --- a/var/spack/repos/builtin/packages/py-rtree/package.py +++ b/var/spack/repos/builtin/packages/py-rtree/package.py @@ -7,18 +7,21 @@ class PyRtree(PythonPackage): - """Python interface to the RTREE.4 Library.""" - homepage = "http://toblerity.org/rtree/" + """R-Tree spatial index for Python GIS.""" + + homepage = "https://github.com/Toblerity/rtree" pypi = "Rtree/Rtree-0.8.3.tar.gz" + version('0.9.7', sha256='be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e') version('0.8.3', sha256='6cb9cf3000963ea6a3db777a597baee2bc55c4fc891e4f1967f262cc96148649') + depends_on('python@3:', when='@0.9.4:', type=('build', 'run')) depends_on('py-setuptools', type='build') - depends_on('libspatialindex') + depends_on('py-wheel', when='@0.9.4:', type='build') + depends_on('libspatialindex@1.8.5:') def setup_build_environment(self, env): - lib = self.spec['libspatialindex'].prefix.lib - env.set('SPATIALINDEX_LIBRARY', - join_path(lib, 'libspatialindex.%s' % dso_suffix)) - env.set('SPATIALINDEX_C_LIBRARY', - join_path(lib, 'libspatialindex_c.%s' % dso_suffix)) + env.set('SPATIALINDEX_C_LIBRARY', self.spec['libspatialindex'].libs[0]) + + def setup_run_environment(self, env): + self.setup_build_environment(env) From fefedbe653b50e459942cf308eff7d11206137d4 Mon Sep 17 00:00:00 2001 From: Ricardo Jesus Date: Mon, 19 Jul 2021 11:25:13 +0100 Subject: [PATCH 130/289] Remove -Wmissing-format-attribute if compiling with nvhpc (#24873) --- var/spack/repos/builtin/packages/libxslt/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/libxslt/package.py b/var/spack/repos/builtin/packages/libxslt/package.py index c42240f303b..cecd64d4776 100644 --- a/var/spack/repos/builtin/packages/libxslt/package.py +++ b/var/spack/repos/builtin/packages/libxslt/package.py @@ -57,3 +57,8 @@ def import_module_test(self): if '+python' in self.spec: with working_dir('spack-test', create=True): python('-c', 'import libxslt') + + def patch(self): + # Remove flags not recognized by the NVIDIA compiler + if self.spec.satisfies('%nvhpc'): + filter_file('-Wmissing-format-attribute', '', 'configure') From 3f9a5eda16f8e9fdedc545e8443d69dd65d1157e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 19 Jul 2021 05:51:17 -0500 Subject: [PATCH 131/289] PROJ: add v8.x (#24892) --- var/spack/repos/builtin/packages/proj/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py index a0a8f336c4b..0bc16b80569 100644 --- a/var/spack/repos/builtin/packages/proj/package.py +++ b/var/spack/repos/builtin/packages/proj/package.py @@ -20,6 +20,9 @@ class Proj(AutotoolsPackage): # Version 6 removes projects.h, while version 7 removes proj_api.h. # Many packages that depend on proj do not yet support the newer API. # See https://github.com/OSGeo/PROJ/wiki/proj.h-adoption-status + version('8.1.0', sha256='22c5cdc5aa0832077b16c95ebeec748a0942811c1c3438c33d43c8d2ead59f48') + version('8.0.1', sha256='e0463a8068898785ca75dd49a261d3d28b07d0a88f3b657e8e0089e16a0375fa') + version('8.0.0', sha256='aa5d4b934450149a350aed7e5fbac880e2f7d3fa2f251c26cb64228f96a2109e') version('7.2.1', sha256='b384f42e5fb9c6d01fe5fa4d31da2e91329668863a684f97be5d4760dbbf0a14') version('7.2.0', sha256='2957798e5fe295ff96a2af1889d0428e486363d210889422f76dd744f7885763') version('7.1.0', sha256='876151e2279346f6bdbc63bd59790b48733496a957bccd5e51b640fdd26eaa8d') From 29c7542c48409c5d4f4a73400495d5d9a82f49a0 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 19 Jul 2021 05:52:02 -0500 Subject: [PATCH 132/289] py-pyproj: add new versions (#24893) --- .../builtin/packages/py-pyproj/package.py | 48 ++++++++++++++----- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pyproj/package.py b/var/spack/repos/builtin/packages/py-pyproj/package.py index c7f00b4fc7e..01dc4cccdf3 100644 --- a/var/spack/repos/builtin/packages/py-pyproj/package.py +++ b/var/spack/repos/builtin/packages/py-pyproj/package.py @@ -7,7 +7,8 @@ class PyPyproj(PythonPackage): - """Python interface to the PROJ.4 Library.""" + """Python interface to PROJ (cartographic projections and + coordinate transformations library).""" homepage = "https://github.com/pyproj4/pyproj" pypi = "pyproj/pyproj-2.2.0.tar.gz" @@ -15,23 +16,44 @@ class PyPyproj(PythonPackage): maintainers = ['citibeth', 'adamjstewart'] + version('3.1.0', sha256='67b94f4e694ae33fc90dfb7da0e6b5ed5f671dd0acc2f6cf46e9c39d56e16e1a') + version('3.0.1', sha256='bfbac35490dd17f706700673506eeb8170f8a2a63fb5878171d4e6eef242d141') + version('3.0.0', sha256='539e320d06e5441edadad2e2ab276e1877445eca384fc1c056b5501453d433c2') + version('2.6.1', sha256='52556f245f1112f121091937b47738d1fbcbd0f13be6fb32689de31ab0975d24') version('2.6.0', sha256='977542d2f8cf2981cf3ad72cedfebcd6ac56977c7aa830d9b49fa7888b56e83d') version('2.2.0', sha256='0a4f793cc93539c2292638c498e24422a2ec4b25cb47545addea07724b2a56e5') version('2.1.3', sha256='99c52788b01a7bb9a88024bf4d40965c0a66a93d654600b5deacf644775f424d') - version('1.9.6', sha256='e0c02b1554b20c710d16d673817b2a89ff94738b0b537aead8ecb2edc4c4487b') - version('1.9.5.1', sha256='53fa54c8fa8a1dfcd6af4bf09ce1aae5d4d949da63b90570ac5ec849efaf3ea8') + version('1.9.6', sha256='e0c02b1554b20c710d16d673817b2a89ff94738b0b537aead8ecb2edc4c4487b', deprecated=True) + version('1.9.5.1', sha256='53fa54c8fa8a1dfcd6af4bf09ce1aae5d4d949da63b90570ac5ec849efaf3ea8', deprecated=True) - depends_on('python@:2', when='@:1.9.5.1') - depends_on('python@3:', when='@2.3:') - depends_on('python@3.5:', when='@2.6.0:') - depends_on('py-setuptools', type='build') - depends_on('py-cython', type='build') - depends_on('py-cython@0.28:', when='@2.6.0:') - depends_on('py-aenum', type=('build', 'run'), when='@2.2:^python@:3.5') + # In setup.cfg and setup.py + depends_on('python@3.7:', when='@3.1:', type=('build', 'link', 'run')) + depends_on('python@3.6:', when='@3.0:', type=('build', 'link', 'run')) + depends_on('python@3.5:', when='@2.3:', type=('build', 'link', 'run')) + depends_on('python@2.7:2.8,3.5:', when='@2.2:', type=('build', 'link', 'run')) + depends_on('python@2.6:2.8,3.3:', type=('build', 'link', 'run')) + + # In setup.py + # https://pyproj4.github.io/pyproj/stable/installation.html#installing-from-source depends_on('proj') - depends_on('proj@:5', when='@:1') - depends_on('proj@6.1:', when='@2.2:') - depends_on('proj@6.0:', when='@2.0:') + depends_on('proj@7.2:', when='@3.0.1:') + depends_on('proj@7.2.0:7.2.999', when='@3.0.0') + depends_on('proj@6.2:7.0', when='@2.4:2.6') + depends_on('proj@6.1:7.0', when='@2.2:2.3') + depends_on('proj@6.0:6.999', when='@2.0:2.1') + depends_on('proj@:5.2', when='@:1.9') + + # In setup.py + depends_on('py-setuptools', type='build') + depends_on('py-certifi', when='@3.0:', type=('build', 'run')) + depends_on('py-aenum', when='@2.2.0:2.2.999 ^python@:3.5.999', type=('build', 'run')) + + # In pyproject.toml + depends_on('py-cython@0.28.4:', when='@2.0:') def setup_build_environment(self, env): + # https://pyproj4.github.io/pyproj/stable/installation.html#pyproj-build-environment-variables + env.set('PROJ_VERSION', self.spec['proj'].version) env.set('PROJ_DIR', self.spec['proj'].prefix) + env.set('PROJ_LIBDIR', self.spec['proj'].libs.directories[0]) + env.set('PROJ_INCDIR', self.spec['proj'].headers.directories[0]) From 846ab65cc08b2bfe0ada8a8cc508bbdac8f4cead Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 19 Jul 2021 05:57:21 -0500 Subject: [PATCH 133/289] py-pythran: add new version (#24900) --- .../builtin/packages/py-pythran/package.py | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pythran/package.py b/var/spack/repos/builtin/packages/py-pythran/package.py index dcefa7818c0..121eee704c8 100644 --- a/var/spack/repos/builtin/packages/py-pythran/package.py +++ b/var/spack/repos/builtin/packages/py-pythran/package.py @@ -12,14 +12,33 @@ class PyPythran(PythonPackage): homepage = "https://github.com/serge-sans-paille/pythran" pypi = "pythran/pythran-0.9.11.tar.gz" + version('0.9.12', sha256='5d50dc74dca1d3f902941865acbae981fc24cceeb9d54673d68d6b5c8c1b0001') version('0.9.11', sha256='a317f91e2aade9f6550dc3bf40b5caeb45b7e012daf27e2b3e4ad928edb01667') + version('0.9.10', sha256='8fa1d19624cb2950e5a18974fdcb0dffc57e1a821049dc95df09563edd673915') + version('0.9.9', sha256='aaabc97f30ad46d1d62303323de6697d2933779afa4666c15b0f433cb50825b1') + version('0.9.8', sha256='81c10a16fce9ed41211fb70e82fda6984e93f4602a164934648db8cbb08156b3') + version('0.9.7', sha256='ac36a94bd862e3c80dae585158b90d3e7c5c05fd252819f3ca7d880a1c7c1012') + version('0.9.6', sha256='2d102a55d9d53f77cf0f4a904eeb5cbaa8fe76e4892319a859fc618401e2f6ba') + version('0.9.5', sha256='815a778d6889593c0b8ddf08052cff36a504ce4cc8bd8d7bfb856a212f91486e') + version('0.9.4', sha256='ec9c91f5331454263b064027292556a184a9f55a50f8615e09b08f57a4909855') + version('0.9.3', sha256='217427a8225a331fdc8f3efe57871aed775cdf2c6e847a0a83df0aaae4b02493') + depends_on('python@3:', when='@0.9.6:', type=('build', 'run')) + depends_on('python@2.7:', when='@:0.9.5', type=('build', 'run')) depends_on('py-setuptools', type='build') depends_on('py-pytest-runner', type='build') depends_on('py-ply@3.4:', type=('build', 'run')) - depends_on('py-networkx@2:', type=('build', 'run')) - depends_on('py-decorator', type=('build', 'run')) - depends_on('py-gast@0.4.0:0.4.999', type=('build', 'run')) - depends_on('py-six', type=('build', 'run')) + depends_on('py-networkx@2:', when='@:0.9.11', type=('build', 'run')) + depends_on('py-decorator', when='@:0.9.11', type=('build', 'run')) + depends_on('py-gast@0.5.0:0.5.999', when='@0.9.12:', type=('build', 'run')) + depends_on('py-gast@0.4.0:0.4.999', when='@0.9.7:0.9.11', type=('build', 'run')) + depends_on('py-gast@0.3.3:0.3.999', when='@0.9.6', type=('build', 'run')) + depends_on('py-gast@0.3.0:', when='@0.9.4:0.9.5', type=('build', 'run')) + depends_on('py-gast', when='@:0.9.3', type=('build', 'run')) + depends_on('py-six', when='@:0.9.11', type=('build', 'run')) depends_on('py-numpy', type=('build', 'run')) - depends_on('py-beniget@0.3.0:0.3.999', type=('build', 'run')) + depends_on('py-beniget@0.4.0:0.4.999', when='@0.9.12:', type=('build', 'run')) + depends_on('py-beniget@0.3.0:0.3.999', when='@0.9.7:0.9.11', type=('build', 'run')) + depends_on('py-beniget@0.2.1:0.2.999', when='@0.9.6', type=('build', 'run')) + depends_on('py-beniget@0.2.0:', when='@0.9.4:0.9.5', type=('build', 'run')) + depends_on('py-beniget', when='@:0.9.3', type=('build', 'run')) From efd9884e833efa443cf7b59ef293b571f8f2720f Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Mon, 19 Jul 2021 07:08:36 -0400 Subject: [PATCH 134/289] minc-toolkit: allow building shared libs and enable by default (#24909) --- var/spack/repos/builtin/packages/minc-toolkit/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/minc-toolkit/package.py b/var/spack/repos/builtin/packages/minc-toolkit/package.py index bce163e2eb9..442af8b88f3 100644 --- a/var/spack/repos/builtin/packages/minc-toolkit/package.py +++ b/var/spack/repos/builtin/packages/minc-toolkit/package.py @@ -15,6 +15,8 @@ class MincToolkit(CMakePackage): version('1.9.18.1', commit="38597c464b6e93eda680ab4a9e903366d53d7737", submodules=True) + variant('shared', default=True, + description="Build shared libraries") variant('visualisation', default=False, description="Build visual tools (Display, register, etc.)") @@ -25,7 +27,8 @@ class MincToolkit(CMakePackage): depends_on('freeglut', when="+visualisation") def cmake_args(self): - return [self.define_from_variant('MT_BUILD_VISUAL_TOOLS', 'visualisation'), + return [self.define_from_variant('MT_BUILD_SHARED_LIBS', 'shared'), + self.define_from_variant('MT_BUILD_VISUAL_TOOLS', 'visualisation'), # newer ANTs packaged separately "-DMT_BUILD_ANTS=OFF", # build error; should package newer c3d separately From feb229a5f9db9c7176beefe800112e3bfbf3ba6e Mon Sep 17 00:00:00 2001 From: shanedsnyder Date: Mon, 19 Jul 2021 06:14:32 -0500 Subject: [PATCH 135/289] darshan runtime,darshan-util: convert to autotool packages (#24906) --- .../packages/darshan-runtime/package.py | 55 +++++++++++-------- .../builtin/packages/darshan-util/package.py | 36 +++++++----- 2 files changed, 53 insertions(+), 38 deletions(-) diff --git a/var/spack/repos/builtin/packages/darshan-runtime/package.py b/var/spack/repos/builtin/packages/darshan-runtime/package.py index 31c9f056029..a6af27b1863 100644 --- a/var/spack/repos/builtin/packages/darshan-runtime/package.py +++ b/var/spack/repos/builtin/packages/darshan-runtime/package.py @@ -8,7 +8,7 @@ from spack import * -class DarshanRuntime(Package): +class DarshanRuntime(AutotoolsPackage): """Darshan (runtime) is a scalable HPC I/O characterization tool designed to capture an accurate picture of application I/O behavior, including properties such as patterns of access within files, with @@ -38,6 +38,10 @@ class DarshanRuntime(Package): depends_on('zlib') depends_on('hdf5', when='+hdf5') depends_on('papi', when='+apxc') + depends_on('autoconf', type='build', when='@main') + depends_on('automake', type='build', when='@main') + depends_on('libtool', type='build', when='@main') + depends_on('m4', type='build', when='@main') variant('mpi', default=True, description='Compile with MPI support') variant('hdf5', default=False, description='Compile with HDF5 module') @@ -61,7 +65,13 @@ class DarshanRuntime(Package): conflicts('+apxc', when='@:3.2.1', msg='+apxc variant only available starting from version 3.3.0') - def install(self, spec, prefix): + @property + def configure_directory(self): + return 'darshan-runtime' + + def configure_args(self): + spec = self.spec + extra_args = [] job_id = 'NONE' if '+slurm' in spec: @@ -73,34 +83,31 @@ def install(self, spec, prefix): if '+sge' in spec: job_id = 'JOB_ID' - # TODO: BG-Q and other platform configure options - options = [] - if '+mpi' in spec: - options = ['CC=%s' % spec['mpi'].mpicc] - else: - options = ['--without-mpi'] - if '+hdf5' in spec: - options.extend(['--enable-hdf5-mod=%s' % spec['hdf5'].prefix]) - + if self.version < Version('3.3.2'): + extra_args.append('--enable-hdf5-mod=%s' % spec['hdf5'].prefix) + else: + extra_args.append('--enable-hdf5-mod') if '+apmpi' in spec: - options.extend(['--enable-apmpi-mod']) + extra_args.append('--enable-apmpi-mod') if '+apmpi_sync' in spec: - options.extend(['--enable-apmpi-mod', - '--enable-apmpi-coll-sync']) + extra_args.append(['--enable-apmpi-mod', + '--enable-apmpi-coll-sync']) if '+apxc' in spec: - options.extend(['--enable-apxc-mod']) + extra_args.append(['--enable-apxc-mod']) - options.extend(['--with-mem-align=8', - '--with-log-path-by-env=DARSHAN_LOG_DIR_PATH', - '--with-jobid-env=%s' % job_id, - '--with-zlib=%s' % spec['zlib'].prefix]) + extra_args.append('--with-mem-align=8') + extra_args.append('--with-log-path-by-env=DARSHAN_LOG_DIR_PATH') + extra_args.append('--with-jobid-env=%s' % job_id) + extra_args.append('--with-zlib=%s' % spec['zlib'].prefix) - with working_dir('spack-build', create=True): - configure = Executable('../darshan-runtime/configure') - configure('--prefix=%s' % prefix, *options) - make() - make('install') + if '+mpi' in spec: + extra_args.append('CC=%s' % self.spec['mpi'].mpicc) + else: + extra_args.append('CC=%s' % self.compiler.cc) + extra_args.append('--without-mpi') + + return extra_args def setup_run_environment(self, env): # default path for log file, could be user or site specific setting diff --git a/var/spack/repos/builtin/packages/darshan-util/package.py b/var/spack/repos/builtin/packages/darshan-util/package.py index b5adebc1d2c..dec24758ec6 100644 --- a/var/spack/repos/builtin/packages/darshan-util/package.py +++ b/var/spack/repos/builtin/packages/darshan-util/package.py @@ -6,7 +6,7 @@ from spack import * -class DarshanUtil(Package): +class DarshanUtil(AutotoolsPackage): """Darshan (util) is collection of tools for parsing and summarizing log files produced by Darshan (runtime) instrumentation. This package is typically installed on systems (front-end) where you intend to analyze @@ -32,12 +32,15 @@ class DarshanUtil(Package): version('3.0.0', sha256='95232710f5631bbf665964c0650df729c48104494e887442596128d189da43e0') variant('bzip2', default=False, description="Enable bzip2 compression") - variant('shared', default=True, description='Build shared libraries') variant('apmpi', default=False, description='Compile with AutoPerf MPI module support') variant('apxc', default=False, description='Compile with AutoPerf XC module support') depends_on('zlib') depends_on('bzip2', when="+bzip2", type=("build", "link", "run")) + depends_on('autoconf', type='build', when='@main') + depends_on('automake', type='build', when='@main') + depends_on('libtool', type='build', when='@main') + depends_on('m4', type='build', when='@main') patch('retvoid.patch', when='@3.2.0:3.2.1') @@ -46,20 +49,25 @@ class DarshanUtil(Package): conflicts('+apxc', when='@:3.2.1', msg='+apxc variant only available starting from version 3.3.0') - def install(self, spec, prefix): + @property + def configure_directory(self): + return 'darshan-util' - options = ['CC=%s' % self.compiler.cc, - '--with-zlib=%s' % spec['zlib'].prefix] - if '+shared' in spec: - options.extend(['--enable-shared']) + def configure_args(self): + spec = self.spec + extra_args = [] + extra_args.append('CC=%s' % self.compiler.cc) + extra_args.append('--with-zlib=%s' % spec['zlib'].prefix) if '+apmpi' in spec: - options.extend(['--enable-autoperf-apmpi']) + if self.version < Version('3.3.2'): + extra_args.append('--enable-autoperf-apmpi') + else: + extra_args.append('--enable-apmpi-mod') if '+apxc' in spec: - options.extend(['--enable-autoperf-apxc']) + if self.version < Version('3.3.2'): + extra_args.append('--enable-autoperf-apxc') + else: + extra_args.append('--enable-apxc-mod') - with working_dir('spack-build', create=True): - configure = Executable('../darshan-util/configure') - configure('--prefix=%s' % prefix, *options) - make() - make('install') + return extra_args From 1bf9c10f0c4ec9732bf303b0a00fea674800ec91 Mon Sep 17 00:00:00 2001 From: Timothy Brown Date: Mon, 19 Jul 2021 05:15:16 -0600 Subject: [PATCH 136/289] mpas-model: support Intel compiler (#24905) --- var/spack/repos/builtin/packages/mpas-model/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/mpas-model/package.py b/var/spack/repos/builtin/packages/mpas-model/package.py index 1a14b800f05..0fb7683da53 100644 --- a/var/spack/repos/builtin/packages/mpas-model/package.py +++ b/var/spack/repos/builtin/packages/mpas-model/package.py @@ -14,6 +14,7 @@ class MpasModel(MakefilePackage): homepage = "https://mpas-dev.github.io/" url = "https://github.com/MPAS-Dev/MPAS-Model/archive/v7.0.tar.gz" + maintainers = ['t-brown'] version('7.0', sha256='f898ce257e66cff9e29320458870570e55721d16cb000de7f2cc27de7fdef14f') version('6.3', sha256='e7f1d9ebfeb6ada37d42a286aaedb2e69335cbc857049dc5c5544bb51e7a8db8') @@ -55,6 +56,12 @@ def target(self, model, action): '-Fwide', '-CcdRR8', ]) + elif satisfies('%intel'): + fflags.extend([ + '-r8', + '-convert big_endian', + '-FR', + ]) cppflags.append('-DUNDERSCORE') targets = [ 'FC_PARALLEL={0}'.format(spec['mpi'].mpifc), From fc50e04b594e4f76bcd037e0ec82d508d1be2c7d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Mon, 19 Jul 2021 13:39:17 +0200 Subject: [PATCH 137/289] Fix S3 urlparse scheme error and add test (#24952) --- lib/spack/spack/test/web.py | 5 +++++ lib/spack/spack/util/s3.py | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/spack/spack/test/web.py b/lib/spack/spack/test/web.py index c0ed098b2aa..2ccbf512254 100644 --- a/lib/spack/spack/test/web.py +++ b/lib/spack/spack/test/web.py @@ -279,3 +279,8 @@ def mock_create_s3_session(url): fake_s3_url_does_not_exist = 's3://my-bucket/subdirectory/my-notfound-file' assert(not spack.util.web.url_exists(fake_s3_url_does_not_exist)) + + +def test_s3_url_parsing(): + assert(spack.util.s3._parse_s3_endpoint_url("example.com") == 'https://example.com') + assert(spack.util.s3._parse_s3_endpoint_url("http://example.com") == 'http://example.com') diff --git a/lib/spack/spack/util/s3.py b/lib/spack/spack/util/s3.py index 31a18093e12..b9b56e04981 100644 --- a/lib/spack/spack/util/s3.py +++ b/lib/spack/spack/util/s3.py @@ -11,6 +11,13 @@ import spack.util.url as url_util +def _parse_s3_endpoint_url(endpoint_url): + if not urllib_parse.urlparse(endpoint_url, scheme='').scheme: + endpoint_url = '://'.join(('https', endpoint_url)) + + return endpoint_url + + def create_s3_session(url): url = url_util.parse(url) if url.scheme != 's3': @@ -30,10 +37,7 @@ def create_s3_session(url): endpoint_url = os.environ.get('S3_ENDPOINT_URL') if endpoint_url: - if urllib_parse.urlparse(endpoint_url, scheme=None).scheme is None: - endpoint_url = '://'.join(('https', endpoint_url)) - - s3_client_args['endpoint_url'] = endpoint_url + s3_client_args['endpoint_url'] = _parse_s3_endpoint_url(endpoint_url) # if no access credentials provided above, then access anonymously if not session.get_credentials(): From 339c2290e7d6f3a4a92c14caadeb4bfeccf7e562 Mon Sep 17 00:00:00 2001 From: Kai Torben Ohlhus Date: Mon, 19 Jul 2021 20:46:14 +0900 Subject: [PATCH 138/289] openblas: add version 0.3.17 (#24941) --- var/spack/repos/builtin/packages/openblas/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index 3f98db8fbce..337aad641c5 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -18,6 +18,7 @@ class Openblas(MakefilePackage): git = 'https://github.com/xianyi/OpenBLAS.git' version('develop', branch='develop') + version('0.3.17', sha256='df2934fa33d04fd84d839ca698280df55c690c86a5a1133b3f7266fce1de279f') version('0.3.16', sha256='fa19263c5732af46d40d3adeec0b2c77951b67687e670fb6ba52ea3950460d79') version('0.3.15', sha256='30a99dec977594b387a17f49904523e6bc8dd88bd247266e83485803759e4bbe') version('0.3.14', sha256='d381935d26f9cae8e4bbd7d7f278435adf8e3a90920edf284bb9ad789ee9ad60') From fdcd7f96e5fe78f320029af599d8cdabcfee378a Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 19 Jul 2021 14:49:42 +0200 Subject: [PATCH 139/289] meson: add 0.59.0 and 0.58.1 (#24955) --- var/spack/repos/builtin/packages/meson/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/meson/package.py b/var/spack/repos/builtin/packages/meson/package.py index ea6dcf19cb9..87cdf6e4528 100644 --- a/var/spack/repos/builtin/packages/meson/package.py +++ b/var/spack/repos/builtin/packages/meson/package.py @@ -16,6 +16,8 @@ class Meson(PythonPackage): maintainers = ['michaelkuhn'] + version('0.59.0', sha256='fdbbe8ea8a47f9e21cf4f578f85be8ec3d9c030df3d8cb17df1ae59d8683813a') + version('0.58.1', sha256='78e0f553dd3bc632d5f96ab943b1bbccb599c2c84ff27c5fb7f7fff9c8a3f6b4') version('0.58.0', sha256='991b882bfe4d37acc23c064a29ca209458764a580d52f044f3d50055a132bed4') version('0.57.2', sha256='cd3773625253df4fd1c380faf03ffae3d02198d6301e7c8bc7bba6c66af66096') version('0.57.1', sha256='0c043c9b5350e9087cd4f6becf6c0d10b1d618ca3f919e0dcca2cdf342360d5d') From 78459397223565371ba705619d662fc4e335c261 Mon Sep 17 00:00:00 2001 From: Sreenivasa Murthy Kolam <67086238+srekolam@users.noreply.github.com> Date: Mon, 19 Jul 2021 06:14:05 -0700 Subject: [PATCH 140/289] fix compile error with the correct python path (#24936) --- .../repos/builtin/packages/migraphx/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/var/spack/repos/builtin/packages/migraphx/package.py b/var/spack/repos/builtin/packages/migraphx/package.py index ece84969dd0..7261e464b29 100644 --- a/var/spack/repos/builtin/packages/migraphx/package.py +++ b/var/spack/repos/builtin/packages/migraphx/package.py @@ -43,6 +43,7 @@ def url_for_version(self, version): depends_on('nlohmann-json', type='link') depends_on('msgpack-c', type='link') depends_on('half@1.12.0', type='link') + depends_on('python@3:', type='build') depends_on('py-pybind11', type='build', when='@:4.0.0') depends_on('py-pybind11@2.6:', type='build', when='@4.1.0:') @@ -54,6 +55,17 @@ def url_for_version(self, version): depends_on('rocblas@' + ver, when='@' + ver) depends_on('miopen-hip@' + ver, when='@' + ver) + @property + def cmake_python_hints(self): + """Include the python include path to the + CMake based on current spec + """ + python_spec = self.spec['python'] + include_dir = python_spec.package.get_python_inc() + return [ + self.define('Python_INCLUDE_DIR', include_dir) + ] + def cmake_args(self): args = [ '-DCMAKE_CXX_COMPILER={0}/bin/clang++' @@ -63,4 +75,6 @@ def cmake_args(self): args.append('-DNLOHMANN_JSON_INCLUDE={0}'.format( self.spec['nlohmann-json'].prefix.include)) + if self.spec['cmake'].satisfies('@3.16.0:'): + args += self.cmake_python_hints return args From d74b2967525c3e71183d52cce439a8bbf4b8a51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiziano=20M=C3=BCller?= Date: Mon, 19 Jul 2021 18:28:31 +0200 Subject: [PATCH 141/289] libint: add debug/fma variants, fix tests for v2.6 (#24665) --- .../repos/builtin/packages/libint/package.py | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py index 854849ac339..5a24da60713 100644 --- a/var/spack/repos/builtin/packages/libint/package.py +++ b/var/spack/repos/builtin/packages/libint/package.py @@ -28,6 +28,8 @@ class Libint(AutotoolsPackage): homepage = "https://github.com/evaleev/libint" url = "https://github.com/evaleev/libint/archive/v2.1.0.tar.gz" + maintainers = ['dev-zero'] + version('2.6.0', sha256='4ae47e8f0b5632c3d2a956469a7920896708e9f0e396ec10071b8181e4c8d9fa') version('2.4.2', sha256='86dff38065e69a3a51d15cfdc638f766044cb87e5c6682d960c14f9847e2eac3') version('2.4.1', sha256='0513be124563fdbbc7cd3c7043e221df1bda236a037027ba9343429a27db8ce4') @@ -37,11 +39,16 @@ class Libint(AutotoolsPackage): version('1.1.6', sha256='f201b0c621df678cfe8bdf3990796b8976ff194aba357ae398f2f29b0e2985a6') version('1.1.5', sha256='ec8cd4a4ba1e1a98230165210c293632372f0e573acd878ed62e5ec6f8b6174b') + variant('debug', default=False, + description='Enable building with debug symbols') variant('fortran', default=False, description='Build & install Fortran bindings') variant('tune', default='none', multi=False, values=TUNE_VARIANTS, description='Tune libint for use with the given package') + variant('fma', default=False, + description=('Generate code utilizing FMA' + ' (requires capable CPU and recent enough compiler)')) # Build dependencies depends_on('autoconf@2.52:', type='build') @@ -120,6 +127,9 @@ def configure_args(self): if '@2.6.0:' in self.spec: config_args += ['--with-libint-exportdir=generated'] + config_args += self.enable_or_disable( + 'debug', activation_value=lambda x: 'opt') + config_args += self.enable_or_disable('fma') tune_value = self.spec.variants['tune'].value if tune_value.startswith('cp2k'): @@ -168,30 +178,41 @@ def build_targets(self): return [] @when('@2.6.0:') - def install(self, spec, prefix): + def build(self, spec, prefix): """ Starting from libint 2.6.0 we're using the 2-stage build to get support for the Fortran bindings, required by some packages (CP2K notably). """ + super(Libint, self).build(spec, prefix) + # upstream says that using configure/make for the generated code # is deprecated and one should use CMake, but with the currently # recent 2.7.0.b1 it still doesn't work with working_dir(os.path.join(self.build_directory, 'generated')): # straight from the AutotoolsPackage class: - options = [ + config_args = [ '--prefix={0}'.format(prefix), '--enable-shared', '--with-cxx-optflags={0}'.format(self.optflags), ] - - if '+fortran' in spec: - options += ['--enable-fortran'] + config_args += self.enable_or_disable( + 'debug', activation_value=lambda x: 'opt') + config_args += self.enable_or_disable('fortran') configure = Executable('./configure') - configure(*options) + configure(*config_args) make() + + @when('@2.6.0:') + def check(self): + with working_dir(os.path.join(self.build_directory, 'generated')): + make('check') + + @when('@2.6.0:') + def install(self, spec, prefix): + with working_dir(os.path.join(self.build_directory, 'generated')): make('install') def patch(self): From b8b8450400fa426e696caf0d461a331598fb6ec8 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 20 Jul 2021 04:49:34 +0200 Subject: [PATCH 142/289] py-pygithub: add new package (#24957) --- .../builtin/packages/py-pygithub/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pygithub/package.py diff --git a/var/spack/repos/builtin/packages/py-pygithub/package.py b/var/spack/repos/builtin/packages/py-pygithub/package.py new file mode 100644 index 00000000000..da6c3aac82a --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pygithub/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPygithub(PythonPackage): + """Use the full Github API v3""" + + homepage = "https://pygithub.readthedocs.io/" + pypi = "PyGithub/PyGithub-1.54.1.tar.gz" + + version('1.55', sha256='1bbfff9372047ff3f21d5cd8e07720f3dbfdaf6462fcaed9d815f528f1ba7283') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-deprecated', type=('build', 'run')) + depends_on('py-pyjwt@2:', type=('build', 'run')) + depends_on('py-pynacl@1.4.0:', type=('build', 'run')) + depends_on('py-requests@2.14.0:', type=('build', 'run')) From 3a698112ccbbb2e87874a8af3e9f5b9d61bfb76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiziano=20M=C3=BCller?= Date: Tue, 20 Jul 2021 05:57:54 +0200 Subject: [PATCH 143/289] abinit: make libxml2 really optional, add optimization-flavor variant, fix build with ifort for atompaw (#24876) --- .../repos/builtin/packages/abinit/package.py | 63 ++++++++++--------- .../atompaw/atompaw-4.1.1.0-fix-ifort.patch | 15 +++++ .../repos/builtin/packages/atompaw/package.py | 2 + 3 files changed, 49 insertions(+), 31 deletions(-) create mode 100644 var/spack/repos/builtin/packages/atompaw/atompaw-4.1.1.0-fix-ifort.patch diff --git a/var/spack/repos/builtin/packages/abinit/package.py b/var/spack/repos/builtin/packages/abinit/package.py index 39be0efd34d..939118efa24 100644 --- a/var/spack/repos/builtin/packages/abinit/package.py +++ b/var/spack/repos/builtin/packages/abinit/package.py @@ -51,6 +51,10 @@ class Abinit(AutotoolsPackage): variant('libxml2', default=False, description='Enable libxml2 support, used by multibinit') + variant('optimization-flavor', default='standard', multi=False, + values=('safe', 'standard', 'aggressive'), + description='Select the optimization flavor to use.') + # Add dependencies depends_on('atompaw') depends_on('blas') @@ -75,7 +79,7 @@ class Abinit(AutotoolsPackage): depends_on('libxc@:2', when='@:8') # libxml2 - depends_on('libxml2', when='@9:') + depends_on('libxml2', when='@9:+libxml2') # Cannot ask for +scalapack if it does not depend on MPI conflicts('+scalapack', when='~mpi') @@ -122,6 +126,8 @@ def configure_args(self): options += self.with_or_without('libxml2') oapp = options.append + oapp('--with-optim-flavor={0}' + .format(self.spec.variants['optimization-flavor'].value)) if '+wannier90' in spec: if '@:8' in spec: @@ -190,48 +196,38 @@ def configure_args(self): oapp('--with-linalg-flavor={0}'.format(linalg_flavor)) - # FFTW3: use sequential from fftw3 or MKL - if '@:8' in spec: + if '^mkl' in spec: + fftflavor = 'dfti' + elif '^fftw' in spec: if '+openmp' in spec: fftflavor, fftlibs = 'fftw3-threads', '-lfftw3_omp -lfftw3 -lfftw3f' + else: + fftflavor, fftlibs = 'fftw3', '-lfftw3 -lfftw3f' + + oapp('--with-fft-flavor={0}'.format(fftflavor)) + + if '@:8' in spec: + if '^mkl' in spec: + oapp('--with-fft-incs={0}'.format(spec['fftw-api'].headers.cpp_flags)) + oapp('--with-fft-libs={0}'.format(spec['fftw-api'].libs.ld_flags)) + elif '^fftw' in spec: options.extend([ '--with-fft-incs={0}'.format(spec['fftw'].headers.cpp_flags), '--with-fft-libs=-L{0} {1}'.format( spec['fftw'].prefix.lib, fftlibs), ]) - else: - oapp('--with-fft-incs={0}'.format(spec['fftw-api'].headers.cpp_flags)) - if '^mkl' in spec: - fftflavor = 'dfti' - oapp('--with-fft-libs={0}'.format(spec['fftw-api'].libs.ld_flags)) - elif '^fftw' in spec: - fftflavor, fftlibs = 'fftw3', '-lfftw3 -lfftw3f' - oapp('--with-fft-libs=-L{0} {1}'.format( - spec['fftw-api'].prefix.lib, fftlibs)) else: - if '+openmp' in spec: - fftflavor, fftlibs = 'fftw3-threads', '-lfftw3_omp -lfftw3 -lfftw3f' + if '^mkl' in spec: + options.extend([ + 'FFT_CPPFLAGS={0}'.format(spec['fftw-api'].headers.cpp_flags), + 'FFT_LIBs={0}'.format(spec['fftw-api'].libs.ld_flags), + ]) + elif '^fftw' in spec: options.extend([ 'FFTW3_CPPFLAGS={0}'.format(spec['fftw'].headers.cpp_flags), 'FFTW3_LIBS=-L{0} {1}'.format( spec['fftw'].prefix.lib, fftlibs), ]) - else: - if '^mkl' in spec: - fftflavor = 'dfti' - options.extend([ - 'FFT_CPPFLAGS={0}'.format(spec['fftw-api'].headers.cpp_flags), - 'FFT_LIBs={0}'.format(spec['fftw-api'].libs.ld_flags), - ]) - elif '^fftw' in spec: - fftflavor, fftlibs = 'fftw3', '-lfftw3 -lfftw3f' - options.extend([ - 'FFTW3_CPPFLAGS={0}'.format(spec['fftw-api'].headers.cpp_flags), - 'FFTW3_LIBS=-L{0} {1}'.format( - spec['fftw-api'].prefix.lib, fftlibs), - ]) - - oapp('--with-fft-flavor={0}'.format(fftflavor)) # LibXC library libxc = spec['libxc:fortran'] @@ -274,4 +270,9 @@ def check(self): explicitly activated by user. """ make('check') - make('tests_in') + + # the tests directly execute abinit. thus failing with MPI + # TODO: run tests in tests/ via the builtin runtests.py + # requires Python with numpy, pyyaml, pandas + if '~mpi' in self.spec: + make('tests_in') diff --git a/var/spack/repos/builtin/packages/atompaw/atompaw-4.1.1.0-fix-ifort.patch b/var/spack/repos/builtin/packages/atompaw/atompaw-4.1.1.0-fix-ifort.patch new file mode 100644 index 00000000000..59ace7cb0f8 --- /dev/null +++ b/var/spack/repos/builtin/packages/atompaw/atompaw-4.1.1.0-fix-ifort.patch @@ -0,0 +1,15 @@ +diff --git a/src/io_tools.F90 b/src/io_tools.F90 +index fe94582..5da3abc 100644 +--- a/src/io_tools.F90 ++++ b/src/io_tools.F90 +@@ -8,7 +8,9 @@ + #endif + + MODULE io_tools +- ++#if defined (__INTEL_COMPILER) ++ USE IFPORT ++#endif + IMPLICIT NONE + + PRIVATE diff --git a/var/spack/repos/builtin/packages/atompaw/package.py b/var/spack/repos/builtin/packages/atompaw/package.py index ed4f7f68111..f7b27516343 100644 --- a/var/spack/repos/builtin/packages/atompaw/package.py +++ b/var/spack/repos/builtin/packages/atompaw/package.py @@ -29,6 +29,8 @@ class Atompaw(Package): depends_on('libxc') depends_on('libxc@:2', when='@:4.0') + patch('atompaw-4.1.1.0-fix-ifort.patch', when='@4.1.1.0:') + def install(self, spec, prefix): options = ['--prefix=%s' % prefix] From 8080a5e5b25e69e0631de1b3205dbc00b3a56bb4 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 19 Jul 2021 21:08:37 -0700 Subject: [PATCH 144/289] Add Julia v1.6.2 (#24935) --- var/spack/repos/builtin/packages/julia/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py index e02f1f9ecec..c2af83df20b 100644 --- a/var/spack/repos/builtin/packages/julia/package.py +++ b/var/spack/repos/builtin/packages/julia/package.py @@ -19,6 +19,7 @@ class Julia(Package): maintainers = ['glennpj'] version('master', branch='master') + version('1.6.2', sha256='01241120515cb9435b96179cf301fbd2c24d4405f252588108d13ceac0f41c0a') version('1.6.1', sha256='71d8e40611361370654e8934c407b2dec04944cf3917c5ecb6482d6b85ed767f') version('1.6.0', sha256='1b05f42c9368bc2349c47363b7ddc175a2da3cd162d52b6e24c4f5d4d6e1232c') version('1.5.4', sha256='dbfb8cd544b223eff70f538da7bb9d5b6f76fd0b00dd2385e6254e74ad4e892f') From 330507f329c4d79a08fd5e0b4d4e9f3b20ce37c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Sedl=C3=A1k?= Date: Tue, 20 Jul 2021 09:44:32 +0200 Subject: [PATCH 145/289] ncbi-rmblastn: add build dependency on cpio (#24963) Although `cpio` is present in many environments, it may not be always available. The failure to build this package can be reproduced in a fresh Docker image `debian:10`. --- var/spack/repos/builtin/packages/ncbi-rmblastn/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/ncbi-rmblastn/package.py b/var/spack/repos/builtin/packages/ncbi-rmblastn/package.py index e7ef8bf8975..95f3a14b14b 100644 --- a/var/spack/repos/builtin/packages/ncbi-rmblastn/package.py +++ b/var/spack/repos/builtin/packages/ncbi-rmblastn/package.py @@ -34,6 +34,7 @@ class NcbiRmblastn(AutotoolsPackage): archive_sha256='e746ee480ade608052306fd21f015c8a323f27029f65399275216f9a4c882d59', when='@2.9.0' ) + depends_on('cpio', type='build') configure_directory = 'c++' From 2c87992506db934521e85186ab7565eb904848ad Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Tue, 20 Jul 2021 02:48:48 -0500 Subject: [PATCH 146/289] petsc: pass in 'cuda_arch' to configure via --with-cuda-gencodearch [or CUDAFLAGS for older releases] (#24962) --- var/spack/repos/builtin/packages/petsc/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 9fbf97ea75a..aaf0aabf9b2 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -431,6 +431,15 @@ def install(self, spec, prefix): library=petsclibname, path=spec[library].prefix) ) + if '+cuda' in spec: + if not spec.satisfies('cuda_arch=none'): + cuda_arch = spec.variants['cuda_arch'].value + if spec.satisfies('@3.14:'): + options.append('--with-cuda-gencodearch={0}'.format(cuda_arch[0])) + else: + options.append('CUDAFLAGS=-gencode arch=compute_{0},code=sm_{0}' + .format(cuda_arch[0])) + # PETSc does not pick up SuperluDist from the dir as they look for # superlu_dist_4.1.a if 'superlu-dist' in spec: From 19677c5ad1decba8e8f69d254412ee5a1a245f7c Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Tue, 20 Jul 2021 02:50:05 -0500 Subject: [PATCH 147/289] petsc, petsc4py: add version 3.15.2 (#24961) --- var/spack/repos/builtin/packages/petsc/package.py | 1 + var/spack/repos/builtin/packages/py-petsc4py/package.py | 1 + 2 files changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index aaf0aabf9b2..1ee1a3825f3 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -19,6 +19,7 @@ class Petsc(Package, CudaPackage, ROCmPackage): version('main', branch='main') version('xsdk-0.2.0', tag='xsdk-0.2.0') + version('3.15.2', sha256='3b10c19c69fc42e01a38132668724a01f1da56f5c353105cd28f1120cc9041d8') version('3.15.1', sha256='c0ac6566e69d1d70b431e07e7598e9de95e84891c2452db1367c846b75109deb') version('3.15.0', sha256='ac46db6bfcaaec8cd28335231076815bd5438f401a4a05e33736b4f9ff12e59a') version('3.14.6', sha256='4de0c8820419fb15bc683b780127ff57067b62ca18749e864a87c6d7c93f1230') diff --git a/var/spack/repos/builtin/packages/py-petsc4py/package.py b/var/spack/repos/builtin/packages/py-petsc4py/package.py index 21adeb3d1cd..d9150b31ea9 100644 --- a/var/spack/repos/builtin/packages/py-petsc4py/package.py +++ b/var/spack/repos/builtin/packages/py-petsc4py/package.py @@ -17,6 +17,7 @@ class PyPetsc4py(PythonPackage): maintainers = ['dalcinl', 'balay'] version('main', branch='main') + version('3.15.2', sha256='d7ed1d79d88b35da563d25e733f276595ba538c52756225f79ba92e1cc4658d3') version('3.15.1', sha256='4ec8f42081e4d6a61157b32869b352dcb18c69077f2d1e4160f3837efd9e150f') version('3.15.0', sha256='87dcc5ef63a1f0e1a963619f7527e623f52341b2806056b0ef5fdfb0b8b287ad') version('3.14.1', sha256='f5f8daf3a4cd1dfc945876b0d83a05b25f3c54e08046312eaa3e3036b24139c0') From 4d5f7b361ef77bfc865224514f3f77c479947700 Mon Sep 17 00:00:00 2001 From: Bryan Herman <63422190+bryanherman@users.noreply.github.com> Date: Tue, 20 Jul 2021 03:54:32 -0400 Subject: [PATCH 148/289] pvm: add fpic variant (#24954) --- var/spack/repos/builtin/packages/pvm/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/var/spack/repos/builtin/packages/pvm/package.py b/var/spack/repos/builtin/packages/pvm/package.py index 75b61871c80..fe740619225 100644 --- a/var/spack/repos/builtin/packages/pvm/package.py +++ b/var/spack/repos/builtin/packages/pvm/package.py @@ -21,6 +21,9 @@ class Pvm(MakefilePackage): depends_on('m4', type='build') depends_on('libtirpc', type='link') + variant('fpic', default=False, + description='Enables -fPIC compilation flag on static libraries.') + parallel = False @property @@ -34,6 +37,17 @@ def edit(self, spec, prefix): # variable "PVM_ROOT" to the path where PVM resides env['PVM_ROOT'] = self.stage.source_path + def patch(self): + + pvm_arch = self.pvm_arch + + if '+fpic' in self.spec: + filter_file( + '^SHAREDCFLAGS =', + 'SHAREDCFLAGS = -fPIC', + join_path('conf', pvm_arch + '.def') + ) + def setup_build_environment(self, env): tirpc = self.spec['libtirpc'].prefix env.prepend_path( From d511364a43d9bb5cf34df79e235a7e28e2e8f582 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 20 Jul 2021 02:57:37 -0500 Subject: [PATCH 149/289] py-numpy: add v1.21.1 (#24950) --- var/spack/repos/builtin/packages/py-numpy/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 3d98db542b7..d13f08813c2 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -24,6 +24,7 @@ class PyNumpy(PythonPackage): version('main', branch='main') version('master', branch='main', deprecated=True) + version('1.21.1', sha256='dff4af63638afcc57a3dfb9e4b26d434a7a602d225b42d746ea7fe2edf1342fd') version('1.21.0', sha256='e80fe25cba41c124d04c662f33f6364909b985f2eb5998aaa5ae4b9587242cce') version('1.20.3', sha256='e55185e51b18d788e49fe8305fd73ef4470596b33fc2c1ceb304566b99c71a69') version('1.20.2', sha256='878922bf5ad7550aa044aa9301d417e2d3ae50f0f577de92051d739ac6096cee') From 899e08a180f1bf61a883463242a6945c7d5fc3a8 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Tue, 20 Jul 2021 01:59:01 -0600 Subject: [PATCH 150/289] votca: add v2021.1 (#24949) apply patch only to @2021 --- .../repos/builtin/packages/votca-csg-tutorials/package.py | 3 ++- var/spack/repos/builtin/packages/votca-csg/package.py | 3 ++- var/spack/repos/builtin/packages/votca-tools/package.py | 3 ++- var/spack/repos/builtin/packages/votca-xtp/package.py | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py b/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py index 2890a1bf0d1..52636dca2d3 100644 --- a/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py +++ b/var/spack/repos/builtin/packages/votca-csg-tutorials/package.py @@ -22,6 +22,7 @@ class VotcaCsgTutorials(CMakePackage): version('master', branch='master') version('stable', branch='stable') + version('2021.1', sha256='5ea1e6ca370e6e7845f9195495f5fb8bbd72d601980e123ae7852f491f03949a') version('2021', sha256='2b85c69007bb7d773529020e55fd82fed65651ee21eedccca9a801ab248ece97') version('1.6.4', sha256='34ef40db6b178a7f513f8a6f43e7caff6ecb498d66d7bf8bc44900bc7aea31dc') version('1.6.3', sha256='709582b978d84f9de09ae6c3ba4ed28daec886d4e0431bc7d19c7246bd65f0b1') @@ -34,6 +35,6 @@ class VotcaCsgTutorials(CMakePackage): version('1.4', sha256='27d50acd68a9d8557fef18ec2b0c62841ae91c22275ab9afbd65c35e4dd5f719') for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "1.6.1", "1.6.2", - "1.6.3", "1.6.4", "2021", "master", "stable"]: + "1.6.3", "1.6.4", "2021", "2021.1", "master", "stable"]: depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") diff --git a/var/spack/repos/builtin/packages/votca-csg/package.py b/var/spack/repos/builtin/packages/votca-csg/package.py index 5ecc282f340..320082884ea 100644 --- a/var/spack/repos/builtin/packages/votca-csg/package.py +++ b/var/spack/repos/builtin/packages/votca-csg/package.py @@ -22,6 +22,7 @@ class VotcaCsg(CMakePackage): version('master', branch='master') version('stable', branch='stable') + version('2021.1', sha256='1e9cf90ddd7539e711e795292b721a4ee130a2089e659fa068a12960b77fff14') version('2021', sha256='d66c9b30ce2a56d630d5db281444447d398be643005ebea70d3735fb60357305') version('1.6.4', sha256='eae771b623f3c3edb09744030d053f10c75d64bad919df26c4f9bf3bfaa1cf86') version('1.6.3', sha256='35456b1f3116364b10ada37d99798294bd2d3df2e670cef3936251f88036ef88') @@ -35,7 +36,7 @@ class VotcaCsg(CMakePackage): depends_on("cmake@2.8:", type='build') for v in ["1.4", "1.4.1", "1.5", "1.5.1", "1.6", "1.6.1", "1.6.2", - "1.6.3", "1.6.4", "2021", "master", "stable"]: + "1.6.3", "1.6.4", "2021", "2021.1", "master", "stable"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("boost") depends_on("gromacs~mpi@5.1:2019.9999") diff --git a/var/spack/repos/builtin/packages/votca-tools/package.py b/var/spack/repos/builtin/packages/votca-tools/package.py index 4bfc91b707d..9a86a71dcea 100644 --- a/var/spack/repos/builtin/packages/votca-tools/package.py +++ b/var/spack/repos/builtin/packages/votca-tools/package.py @@ -22,6 +22,7 @@ class VotcaTools(CMakePackage): version('master', branch='master') version('stable', branch='stable') + version('2021.1', sha256='c2fdf5ab72fc75580fb3623182fa88dd0eed856388bdc862aff42148bb0a16e7') version('2021', sha256='b84f68ba4a8bfae7b06b61e1e078dcbfb3b340c516da3be39ef545152da00ccd') version('1.6.4', sha256='aa79ef4617a80ba3ca063932d5ee0d5767c0285b4b613abd373ad3c986ab9f4c') version('1.6.3', sha256='b4ba63861f4342070d81309992f76c4cc798dffeab894bff64799881e75b3cc2') @@ -36,7 +37,7 @@ class VotcaTools(CMakePackage): # https://github.com/votca/tools/pull/229, fix mkl in exported target patch("https://github.com/votca/tools/pull/229.patch", sha256="250d0b679e5d3104e3c8d6adf99751b71386c7ed4cbdae1c75408717ef3f401f", when="@1.6:1.6.0+mkl") # https://github.com/votca/tools/pull/361, fix build with newer glibc/gcc, fixed in stable and 2021.1 - patch("https://github.com/votca/tools/commit/6bb7e35ba7d1a31247eafb323be2777ec0439cfe.patch", sha256="3c9fa5ac9cf45c54ac475bcb22350793efaccd6b5154e3d30c24b8aa754fe47b", when="@2021") + patch("https://github.com/votca/tools/commit/6bb7e35ba7d1a31247eafb323be2777ec0439cfe.patch", sha256="3c9fa5ac9cf45c54ac475bcb22350793efaccd6b5154e3d30c24b8aa754fe47b", when="@2021:2021.0") variant('mkl', default=False, description='Build with MKL support') conflicts('+mkl', when='@1.4:1.5.9999') diff --git a/var/spack/repos/builtin/packages/votca-xtp/package.py b/var/spack/repos/builtin/packages/votca-xtp/package.py index 51d6678876f..731a30d21c4 100644 --- a/var/spack/repos/builtin/packages/votca-xtp/package.py +++ b/var/spack/repos/builtin/packages/votca-xtp/package.py @@ -22,6 +22,7 @@ class VotcaXtp(CMakePackage): version('master', branch='master') version('stable', branch='stable') + version('2021.1', sha256='8ce112fc40676690369133188848dfeb3875d57351286cad4c312057a4dd767b') version('2021', sha256='43bb5a52fec675738f4b5896f0833a1c1090bd7e74f97769697495abf4652e40') version('1.6.4', sha256='699a835954556cf6b2f20dac7942c1761c6dd6c6c3fbdde62c8bfcfd71ee075b') version('1.6.3', sha256='757b9a6a470b3c356f638d62269c5b72b8ace374f006658aef8bb6afd1ad1413') @@ -34,7 +35,8 @@ class VotcaXtp(CMakePackage): depends_on("cmake@2.8:", type='build') for v in ["1.4.1", "1.5", "1.5.1", "1.6", "1.6.1", "1.6.2", - "1.6.3", "1.6.4", "2021", "master", "stable"]: + "1.6.3", "1.6.4", "2021", "2021.1", "master", + "stable"]: depends_on('votca-tools@%s' % v, when="@%s:%s.0" % (v, v)) depends_on('votca-csg@%s' % v, when="@%s:%s.0" % (v, v)) depends_on("libxc", when='@stable,1.5:') From 7ad7fa4da9f9310a89abfacfc61582f3c93bc1c8 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 20 Jul 2021 03:00:54 -0500 Subject: [PATCH 151/289] py-pytorch-lightning: add v1.3.8 (#24944) --- .../packages/py-pytorch-lightning/package.py | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pytorch-lightning/package.py b/var/spack/repos/builtin/packages/py-pytorch-lightning/package.py index 982362e9669..7dd74c3b597 100644 --- a/var/spack/repos/builtin/packages/py-pytorch-lightning/package.py +++ b/var/spack/repos/builtin/packages/py-pytorch-lightning/package.py @@ -12,20 +12,24 @@ class PyPytorchLightning(PythonPackage): homepage = "https://github.com/PyTorchLightning/pytorch-lightning" pypi = "pytorch-lightning/pytorch-lightning-1.2.10.tar.gz" + version('1.3.8', sha256='60b0a3e464d394864dae4c8d251afa7aa453644a19bb7672f5ee400343cdf7b0') version('1.2.10', sha256='2d8365e30ded0c20e73ce6e5b6028478ae460b8fd33727df2275666df005a301') - conflicts('py-pyyaml@5.4') # OmegaConf requirement >=5.1 - conflicts('py-tensorboard@2.5.0') # 2.5.0 GPU CI error: Couldn't build proto file into descriptor pool! - - # requirements from setup.py - depends_on('py-setuptools', type='build') - depends_on('python@3.6:', type=('build', 'run')) - depends_on('py-torch@1.4:', type=('build', 'run')) - depends_on('py-numpy@1.16.6:', type=('build', 'run')) - depends_on('py-future@0.17.1:', type=('build', 'run')) - depends_on('py-pyyaml@5.1:', type=('build', 'run')) - depends_on('py-tqdm@4.41.0:', type=('build', 'run')) - depends_on('py-fsspec@0.8.1:+http', type=('build', 'run')) - depends_on('py-tensorboard@2.2.0:', type=('build', 'run')) - depends_on('py-torchmetrics@0.2.0', type=('build', 'run')) - depends_on('py-packaging', type=('build', 'run')) + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-numpy@1.17.2:', when='@1.3:', type=('build', 'run')) + depends_on('py-numpy@1.16.6:', when='@:1.2', type=('build', 'run')) + depends_on('py-torch@1.4:', type=('build', 'run')) + depends_on('py-future@0.17.1:', type=('build', 'run')) + depends_on('py-tqdm@4.41.0:', type=('build', 'run')) + depends_on('py-pyyaml@5.1:5.4.1', when='@1.3:', type=('build', 'run')) + depends_on('py-pyyaml@5.1:5.3,5.5:', when='@:1.2', type=('build', 'run')) + depends_on('py-fsspec@2021.05.0:2021.05.999,2021.06.1:', when='@1.3:', type=('build', 'run')) + depends_on('py-fsspec@0.8.1:+http', when='@:1.2', type=('build', 'run')) + depends_on('py-tensorboard@2.2.0:2.4.999,2.5.1:', type=('build', 'run')) + depends_on('py-torchmetrics@0.2.0:', when='@1.3:', type=('build', 'run')) + depends_on('py-torchmetrics@0.2.0', when='@:1.2', type=('build', 'run')) + depends_on('py-pydeprecate@0.3.0', when='@1.3:', type=('build', 'run')) + depends_on('py-packaging@17.0:', when='@1.3:', type=('build', 'run')) + depends_on('py-packaging', type=('build', 'run')) + depends_on('pil@:8.2.999,8.3.1:', when='@1.3:', type=('build', 'run')) From db909353e52f0a38d77cc69bd357d4f2c8bd03c1 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 20 Jul 2021 03:01:23 -0500 Subject: [PATCH 152/289] py-fsspec: add v2021.7.0 (#24943) --- var/spack/repos/builtin/packages/py-fsspec/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-fsspec/package.py b/var/spack/repos/builtin/packages/py-fsspec/package.py index e52ee16a0d9..bafd1887b01 100644 --- a/var/spack/repos/builtin/packages/py-fsspec/package.py +++ b/var/spack/repos/builtin/packages/py-fsspec/package.py @@ -12,6 +12,7 @@ class PyFsspec(PythonPackage): homepage = "https://github.com/intake/filesystem_spec" pypi = "fsspec/fsspec-0.4.4.tar.gz" + version('2021.7.0', sha256='792ebd3b54de0b30f1ce73f0ba0a8bcc864724f2d9f248cb8d0ece47db0cbde8') version('2021.4.0', sha256='8b1a69884855d1a8c038574292e8b861894c3373282d9a469697a2b41d5289a6') version('0.8.0', sha256='176f3fc405471af0f1f1e14cffa3d53ab8906577973d068b976114433c010d9d') version('0.7.3', sha256='1b540552c93b47e83c568e87507d6e02993e6d1b30bc7285f2336c81c5014103') From 55fe16991c78c76aa801eb10ab1bc2b2f45e821b Mon Sep 17 00:00:00 2001 From: Sheng Di Date: Tue, 20 Jul 2021 03:01:54 -0500 Subject: [PATCH 153/289] zchecker: add v0.7 (#24942) --- var/spack/repos/builtin/packages/z-checker/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/z-checker/package.py b/var/spack/repos/builtin/packages/z-checker/package.py index 9e933c3236b..f6f170fa3bf 100644 --- a/var/spack/repos/builtin/packages/z-checker/package.py +++ b/var/spack/repos/builtin/packages/z-checker/package.py @@ -12,10 +12,11 @@ class ZChecker(AutotoolsPackage): """a library to perform the compression assessment for lossy compressors""" homepage = "https://github.com/CODARcode/Z-checker" - url = "https://github.com/CODARcode/Z-checker/releases/download/0.5.0/Z-checker-0.5.0.tar.gz" + url = "https://github.com/CODARcode/Z-checker/releases/download/0.7.0/Z-checker-0.7.0.tar.gz" maintainers = ['disheng222'] + version('0.7.0', sha256='02caf3af2dc59d116496f877da888dd2c2dffb9375c413b1d74401927963df3f') version('0.6.0', sha256='b01c2c78157234a734c2f4c10a7ab82c329d3cd1a8389d597e09386fa33a3117') version('0.5.0', sha256='ad5e68472c511b393ee1ae67d2e3072a22004001cf19a14bd99a2e322a6ce7f9') From 967743adc7cb8ee516dfa8ac7dd58b75a2aae37e Mon Sep 17 00:00:00 2001 From: Chris Richardson Date: Tue, 20 Jul 2021 09:03:02 +0100 Subject: [PATCH 154/289] Fenicsx ecosystem: various updates (#24940) * Updates for dependencies in main branch * Add more depends * Make CMake available at runtime for fenics-dolfinx * Add maintainer Co-authored-by: Garth N. Wells --- .../builtin/packages/fenics-basix/package.py | 2 +- .../packages/fenics-dolfinx/package.py | 18 +++++++++++------- .../packages/py-fenics-basix/package.py | 6 +++--- .../packages/py-fenics-dolfinx/package.py | 19 ++++++++++--------- .../packages/py-fenics-ffcx/package.py | 6 +++--- .../builtin/packages/py-fenics-ufl/package.py | 2 +- 6 files changed, 29 insertions(+), 24 deletions(-) diff --git a/var/spack/repos/builtin/packages/fenics-basix/package.py b/var/spack/repos/builtin/packages/fenics-basix/package.py index dc7f01367ce..47fced6e742 100644 --- a/var/spack/repos/builtin/packages/fenics-basix/package.py +++ b/var/spack/repos/builtin/packages/fenics-basix/package.py @@ -12,7 +12,7 @@ class FenicsBasix(CMakePackage): homepage = "https://github.com/FEniCS/basix" url = "https://github.com/FEniCS/basix/archive/0.1.0.tar.gz" git = "https://github.com/FEniCS/basix.git" - maintainers = ["mscroggs", "chrisrichardson"] + maintainers = ["mscroggs", "chrisrichardson", "garth-wells"] version("main", branch="main") version("0.1.0", sha256="2ab41fe6ad4f6c42f01b17a6e7c39debb4e0ae61c334d1caebee78b741bca4e7") diff --git a/var/spack/repos/builtin/packages/fenics-dolfinx/package.py b/var/spack/repos/builtin/packages/fenics-dolfinx/package.py index 7c1b52a4b67..a8c0acec74c 100644 --- a/var/spack/repos/builtin/packages/fenics-dolfinx/package.py +++ b/var/spack/repos/builtin/packages/fenics-dolfinx/package.py @@ -12,7 +12,7 @@ class FenicsDolfinx(CMakePackage): homepage = "https://github.com/FEniCS/dolfinx" git = "https://github.com/FEniCS/dolfinx.git" url = "https://github.com/FEniCS/dolfinx/archive/0.1.0.tar.gz" - maintainers = ["js947", "chrisrichardson"] + maintainers = ["js947", "chrisrichardson", "garth-wells"] version("main", branch="main") version("0.1.0", sha256="0269379769b5b6d4d1864ded64402ecaea08054c2a5793c8685ea15a59af5e33") @@ -21,25 +21,29 @@ class FenicsDolfinx(CMakePackage): variant("parmetis", default=False, description="parmetis support") variant("slepc", default=False, description="slepc support") - depends_on("cmake@3.9:", type="build") + depends_on("cmake@3.12:") depends_on("pkgconfig", type="build") depends_on("mpi") depends_on("hdf5") depends_on("boost@1.7.0:+filesystem+program_options+timer") - depends_on("petsc+mpi+shared", when="@main") - depends_on("petsc+mpi+shared@3.15.0", when="@0.1.0") + depends_on("petsc+mpi+shared") + depends_on("petsc+mpi+shared@3.15.0:", when="@0.1.0") depends_on("scotch+mpi") depends_on("kahip", when="+kahip") depends_on("parmetis", when="+parmetis") depends_on("slepc", when="+slepc") - depends_on("py-fenics-ffcx", type=("build", "run"), when="@main") + depends_on("py-fenics-ffcx", type=("build", "run")) + depends_on("py-fenics-ffcx@main", type=("build", "run"), when="@main") depends_on("py-fenics-ffcx@0.1.0", type=("build", "run"), when="@0.1.0") - depends_on("fenics-basix", type=("build", "run"), when="@main") + depends_on("fenics-basix", type=("build", "run")) + depends_on("fenics-basix@main", type=("build", "run"), when="@main") depends_on("fenics-basix@0.1.0", type=("build", "run"), when="@0.1.0") - depends_on("py-fenics-basix", type=("build", "run"), when="@main") + + depends_on("py-fenics-basix", type=("build", "run")) + depends_on("py-fenics-basix@main", type=("build", "run"), when="@main") depends_on("py-fenics-basix@0.1.0", type=("build", "run"), when="@0.1.0") conflicts('%gcc@:8', msg='Improved C++17 support required') diff --git a/var/spack/repos/builtin/packages/py-fenics-basix/package.py b/var/spack/repos/builtin/packages/py-fenics-basix/package.py index 75dca03d9dd..0cfca370c32 100644 --- a/var/spack/repos/builtin/packages/py-fenics-basix/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-basix/package.py @@ -13,7 +13,7 @@ class PyFenicsBasix(PythonPackage): homepage = "https://github.com/FEniCS/basix" url = "https://github.com/FEniCS/basix/archive/0.1.0.tar.gz" git = "https://github.com/FEniCS/basix.git" - maintainers = ["chrisrichardson", "mscroggs"] + maintainers = ["chrisrichardson", "mscroggs", "garth-wells"] version("main", branch="main") version("0.1.0", sha256="2ab41fe6ad4f6c42f01b17a6e7c39debb4e0ae61c334d1caebee78b741bca4e7") @@ -21,10 +21,10 @@ class PyFenicsBasix(PythonPackage): depends_on("fenics-basix@main", type=("build", "run"), when="@main") depends_on("fenics-basix@0.1.0", type=("build", "run"), when="@0.1.0") - depends_on("python@3.6:", type=('build', 'run')) + depends_on("python@3.7:", type=('build', 'run')) depends_on("py-setuptools", type="build") depends_on("cmake@3.18:", type="build") - depends_on("py-pybind11@2.6.1:2.6.99", type="build") + depends_on("py-pybind11@2.6.2:", type="build") phases = ['build_ext', 'build', 'install'] diff --git a/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py b/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py index ec4f268a4da..56b0608a93d 100644 --- a/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-dolfinx/package.py @@ -13,28 +13,29 @@ class PyFenicsDolfinx(PythonPackage): homepage = "https://github.com/FEniCS/dolfinx" url = "https://github.com/FEniCS/dolfinx/archive/0.1.0.tar.gz" git = "https://github.com/FEniCS/dolfinx.git" - maintainers = ["js947", "chrisrichardson"] + maintainers = ["js947", "chrisrichardson", "garth-wells"] version("main", branch="main") version("0.1.0", sha256="0269379769b5b6d4d1864ded64402ecaea08054c2a5793c8685ea15a59af5e33") - depends_on("cmake@3.9:", type="build") + depends_on("cmake@3.12:", type="build") + depends_on("hdf5", type="build") depends_on("pkgconfig", type=("build", "run")) - depends_on('python@3.5:', type=('build', 'run')) + depends_on('python@3.7:', type=('build', 'run')) depends_on("py-setuptools", type="build") - depends_on("fenics-dolfinx", when="@main") + depends_on("fenics-dolfinx@main", when="@main") depends_on("fenics-dolfinx@0.1.0", when="@0.1.0") - depends_on("fenics-basix", type=("build", "run"), when="@main") + depends_on("fenics-basix@main", type=("build", "run"), when="@main") depends_on("fenics-basix@0.1.0", type=("build", "run"), when="@0.1.0") depends_on("py-mpi4py", type=("build", "run")) depends_on("py-petsc4py", type=("build", "run")) - depends_on("py-pybind11@2.6.1:2.6.99", type=("build", "run")) + depends_on("py-pybind11@2.6.2:", type=("build", "run")) - depends_on("py-fenics-ffcx", type=("run")) + depends_on("py-fenics-ffcx@main", type=("run"), when="@main") depends_on("py-fenics-ffcx@0.1.0", type=("run"), when="@0.1.0") - depends_on("py-fenics-basix", type=("run")) + depends_on("py-fenics-basix", type=("run"), when="@main") depends_on("py-fenics-basix@0.1.0", type=("run"), when="@0.1.0") - depends_on("py-fenics-ufl", type=("run")) + depends_on("py-fenics-ufl@main", type=("run"), when="@main") depends_on("py-fenics-ufl@2021.1.0", type=("run"), when="@0.1.0") depends_on("py-cffi", type=("run")) diff --git a/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py b/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py index 8272b7efe6e..e9b2d989b98 100644 --- a/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-ffcx/package.py @@ -12,7 +12,7 @@ class PyFenicsFfcx(PythonPackage): homepage = "https://github.com/FEniCS/ffcx" url = "https://github.com/FEniCS/ffcx/archive/0.1.0.tar.gz" git = "https://github.com/FEniCS/ffcx.git" - maintainers = ["js947", "chrisrichardson"] + maintainers = ["js947", "chrisrichardson", "garth-wells"] version('main', branch='main') version('0.1.0', sha256='98a47906146ac892fb4a358e04cbfd04066f12d0a4cdb505a6b08ff0b1a17e89') @@ -21,10 +21,10 @@ class PyFenicsFfcx(PythonPackage): depends_on('py-setuptools', type=('build', 'run')) depends_on('py-cffi', type=('build', 'run')) - depends_on('py-fenics-ufl', type=('build', 'run'), when='@main') + depends_on('py-fenics-ufl@main', type=('build', 'run'), when='@main') depends_on('py-fenics-ufl@2021.1.0', type=('build', 'run'), when='@0.1.0') - depends_on('py-fenics-basix', type=('build', 'run'), when='@main') + depends_on('py-fenics-basix@main', type=('build', 'run'), when='@main') depends_on('py-fenics-basix@0.1.0', type=('build', 'run'), when='@0.1.0') depends_on('py-numpy', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-fenics-ufl/package.py b/var/spack/repos/builtin/packages/py-fenics-ufl/package.py index 6b60848a301..757937beffe 100644 --- a/var/spack/repos/builtin/packages/py-fenics-ufl/package.py +++ b/var/spack/repos/builtin/packages/py-fenics-ufl/package.py @@ -16,7 +16,7 @@ class PyFenicsUfl(PythonPackage): homepage = "https://fenicsproject.org/" url = "https://github.com/FEniCS/ufl/archive/2019.1.0.tar.gz" git = "https://github.com/FEniCS/ufl.git" - maintainers = ["js947", "chrisrichardson"] + maintainers = ["js947", "chrisrichardson", "garth-wells"] version("main", branch="main") version('2021.1.0', sha256='130fdc09bb7fcd39dcd2618426912b8a25a03431d94575711068b38c666b4337') From f7be6f94eab44cfc0f8ab20e7bd660cf87ae6570 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 20 Jul 2021 03:03:46 -0500 Subject: [PATCH 155/289] rust: add spack external find support (#24939) --- var/spack/repos/builtin/packages/rust/package.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py index b13a5057f1f..ca3f6f33945 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -2,6 +2,9 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import re + from six import iteritems @@ -459,6 +462,14 @@ class Rust(Package): ) ) + executables = ['^rustc$'] + + @classmethod + def determine_version(csl, exe): + output = Executable(exe)('--version', output=str, error=str) + match = re.match(r'rustc (\S+)', output) + return match.group(1) if match else None + # This routine returns the target architecture we intend to build for. def get_rust_target(self): if 'platform=linux' in self.spec or 'platform=cray' in self.spec: From 8ec0ef4c6dc1330114ed8dbf12ed6f702041f46f Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Tue, 20 Jul 2021 01:06:21 -0700 Subject: [PATCH 156/289] metall: add v0.15 (#24932) --- var/spack/repos/builtin/packages/metall/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/metall/package.py b/var/spack/repos/builtin/packages/metall/package.py index d42b6fe13ce..ee9495733f1 100644 --- a/var/spack/repos/builtin/packages/metall/package.py +++ b/var/spack/repos/builtin/packages/metall/package.py @@ -9,13 +9,14 @@ class Metall(CMakePackage): homepage = "https://github.com/LLNL/metall" git = "https://github.com/LLNL/metall.git" - url = "https://github.com/LLNL/metall/archive/v0.2.tar.gz" + url = "https://github.com/LLNL/metall/archive/v0.15.tar.gz" maintainers = ['KIwabuchi', 'rogerpearce', 'mayagokhale'] version('master', branch='master') version('develop', branch='develop') + version('0.15', sha256='a1ea475ce1297b0c4cdf450544dc60ecf1b0a30c548b08ba77ccda5585df7248') version('0.13', sha256='959d37d0a7e7e5b4d5e6c0334aaaeef1b463e855fa8e807042f662c993ed60b1') version('0.12', sha256='b757b354b355e866bd6d42da53b0160442f3b7f663a19ba113da1ffc1a76176e') version('0.11', sha256='7cfa6a7eaaeb7fd11ecfbe43a172a36c8cde200601d6cd3b309d7a0acf752f3c') From 55e247b407cf677c68c564f60a5cd2d5885e1a25 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 20 Jul 2021 03:12:42 -0500 Subject: [PATCH 157/289] py-pydocstyle: add new package (#24929) --- .../builtin/packages/py-pydocstyle/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pydocstyle/package.py diff --git a/var/spack/repos/builtin/packages/py-pydocstyle/package.py b/var/spack/repos/builtin/packages/py-pydocstyle/package.py new file mode 100644 index 00000000000..12c50b83eb0 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pydocstyle/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPydocstyle(PythonPackage): + """Python docstring style checker.""" + + homepage = "https://github.com/PyCQA/pydocstyle/" + pypi = "pydocstyle/pydocstyle-6.1.1.tar.gz" + + version('6.1.1', sha256='1d41b7c459ba0ee6c345f2eb9ae827cab14a7533a88c5c6f7e94923f72df92dc') + + variant('toml', default=True, description='Allow pydocstyle to read pyproject.toml') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools', type=('build', 'run')) + depends_on('py-snowballstemmer', type=('build', 'run')) + depends_on('py-toml', when='+toml', type=('build', 'run')) From 887820ecb5b60419b4dfcf6934549f4155fc27c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=B6hler?= Date: Tue, 20 Jul 2021 10:16:00 +0200 Subject: [PATCH 158/289] fenics: add HDF5_NO_FIND_PACKAGE_CONFIG_FILE to cmake opts in FEniCS (#24922) In some cases the FindHDF5.cmake returnd a wrong value for the HDF5 library names and path. For example it returns hdf5-shared as library name without a search path or checking if this is really an existing shared library. By HDF5_NO_FIND_PACKAGE_CONFIG_FILE=True/ON to the cmake options, the FindHDF5 module does not rely on a properly install hdf5-config.cmake and thus searches for the library and its paths. This results in a usable return value and fenics works afterwards. --- var/spack/repos/builtin/packages/fenics/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py index 01a2f16019f..36eeaef4702 100644 --- a/var/spack/repos/builtin/packages/fenics/package.py +++ b/var/spack/repos/builtin/packages/fenics/package.py @@ -131,6 +131,7 @@ def cmake_args(self): self.define_from_variant('DOLFIN_ENABLE_OPENMP', 'openmp'), self.define_from_variant('DOLFIN_ENABLE_CHOLMOD', 'suite-sparse'), self.define_from_variant('DOLFIN_ENABLE_HDF5', 'hdf5'), + self.define_from_variant('HDF5_NO_FIND_PACKAGE_CONFIG_FILE', 'hdf5'), self.define_from_variant('DOLFIN_ENABLE_MPI', 'mpi'), self.define_from_variant('DOLFIN_ENABLE_PARMETIS', 'parmetis'), self.define_from_variant('DOLFIN_ENABLE_PETSC', 'petsc'), From 9abd77c517c508175f1ba766a00e8f31a30f0c77 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Tue, 20 Jul 2021 01:55:34 -0700 Subject: [PATCH 159/289] poppler: add v21.07.0 (#24931) --- var/spack/repos/builtin/packages/poppler/package.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/poppler/package.py b/var/spack/repos/builtin/packages/poppler/package.py index 6123ff06a11..ccf2516fb3d 100644 --- a/var/spack/repos/builtin/packages/poppler/package.py +++ b/var/spack/repos/builtin/packages/poppler/package.py @@ -10,11 +10,12 @@ class Poppler(CMakePackage): """Poppler is a PDF rendering library based on the xpdf-3.0 code base.""" homepage = "https://poppler.freedesktop.org" - url = "https://poppler.freedesktop.org/poppler-0.77.0.tar.xz" + url = "https://poppler.freedesktop.org/poppler-21.07.0.tar.xz" list_url = "https://poppler.freedesktop.org/releases.html" git = "https://gitlab.freedesktop.org/poppler/poppler.git" version('master', branch='master') + version('21.07.0', sha256='e26ab29f68065de4d6562f0a3e2b5435a83ca92be573b99a1c81998fa286a4d4') version('0.90.1', sha256='984d82e72e91418d280885298c8bdc855a2fd92665fd52a1345b27235e0c71c4') version('0.87.0', sha256='6f602b9c24c2d05780be93e7306201012e41459f289b8279a27a79431ad4150e') version('0.79.0', sha256='f985a4608fe592d2546d9d37d4182e502ff6b4c42f8db4be0a021a1c369528c8') @@ -24,6 +25,7 @@ class Poppler(CMakePackage): version('0.64.0', sha256='b21df92ca99f78067785cf2dc8e06deb04726b62389c0ee1f5d8b103c77f64b1') version('0.61.1', sha256='1266096343f5163c1a585124e9a6d44474e1345de5cdfe55dc7b47357bcfcda9') + variant('boost', default=False, description='Enable Boost for Splash') variant('cms', default=False, description='Use color management system') variant('cpp', default=False, description='Compile poppler cpp wrapper') variant('glib', default=False, description='Compile poppler glib wrapper') @@ -43,6 +45,7 @@ class Poppler(CMakePackage): depends_on('fontconfig') depends_on('freetype') + depends_on('boost@1.58.0:', when='+boost') depends_on('lcms', when='+cms') depends_on('glib@2.41:', when='+glib') depends_on('gobject-introspection', when='+gobject') @@ -86,6 +89,11 @@ def cmake_args(self): # Install header files args.append('-DENABLE_UNSTABLE_API_ABI_HEADERS=ON') + if '+boost' in spec: + args.append('-DENABLE_BOOST=ON') + else: + args.append('-DENABLE_BOOST=OFF') + if '+cms' in spec: args.append('-DENABLE_CMS=lcms2') else: From 0bf5156cafeec1aa92bbf226138f6dd700d31e32 Mon Sep 17 00:00:00 2001 From: Gabriel Rockefeller Date: Tue, 20 Jul 2021 02:58:41 -0600 Subject: [PATCH 160/289] global: add v6.6.7 (#24930) --- var/spack/repos/builtin/packages/global/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/global/package.py b/var/spack/repos/builtin/packages/global/package.py index 661220f6aad..1d078b21fab 100644 --- a/var/spack/repos/builtin/packages/global/package.py +++ b/var/spack/repos/builtin/packages/global/package.py @@ -16,6 +16,7 @@ class Global(Package): maintainers = ['gaber'] + version('6.6.7', sha256='69a0f77f53827c5568176c1d382166df361e74263a047f0b3058aa2f2ad58a3c') version('6.6.6', sha256='758078afff98d4c051c58785c7ada3ed1977fabb77f8897ff657b71cc62d4d5d') version('6.6.4', sha256='987e8cb956c53f8ebe4453b778a8fde2037b982613aba7f3e8e74bcd05312594') version('6.5', sha256='4afd12db1aa600277b39113cc2d61dc59bd6c6b4ee8033da8bb6dd0c39a4c6a9') From d580c5506c2b1f25a1531b94c1d12e90dc428964 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 20 Jul 2021 05:50:51 -0400 Subject: [PATCH 161/289] boost: Allow building with GCC on macOS (#24895) --- .../packages/boost/context-macho-gcc.patch | 22 +++++++++++++++++++ .../repos/builtin/packages/boost/package.py | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/boost/context-macho-gcc.patch diff --git a/var/spack/repos/builtin/packages/boost/context-macho-gcc.patch b/var/spack/repos/builtin/packages/boost/context-macho-gcc.patch new file mode 100644 index 00000000000..f36f86a2ebb --- /dev/null +++ b/var/spack/repos/builtin/packages/boost/context-macho-gcc.patch @@ -0,0 +1,22 @@ +diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 +index eb83bbb..8d8dac8 100644 +--- a/libs/context/build/Jamfile.v2 ++++ b/libs/context/build/Jamfile.v2 +@@ -646,6 +646,17 @@ alias asm_sources + clang + ; + ++alias asm_sources ++ : asm/make_x86_64_sysv_macho_gas.S ++ asm/jump_x86_64_sysv_macho_gas.S ++ asm/ontop_x86_64_sysv_macho_gas.S ++ : sysv ++ 64 ++ x86 ++ mach-o ++ gcc ++ ; ++ + alias asm_sources + : asm/make_x86_64_sysv_macho_gas.S + asm/jump_x86_64_sysv_macho_gas.S diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 411e20596ba..2b6e587b57e 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -277,6 +277,11 @@ def libs(self): # and https://github.com/spack/spack/pull/21408 patch("bootstrap-toolset.patch", when="@1.75") + # Allow building context asm sources with GCC on Darwin + # See https://github.com/spack/spack/pull/24889 + # and https://github.com/boostorg/context/issues/177 + patch("context-macho-gcc.patch", when="+context platform=darwin %gcc") + def patch(self): # Disable SSSE3 and AVX2 when using the NVIDIA compiler if self.spec.satisfies('%nvhpc'): From b3b01a47d23d5de9e10006fb3b6a0775064b6bda Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Tue, 20 Jul 2021 12:45:26 +0200 Subject: [PATCH 162/289] Add Enzyme (#24830) Co-authored-by: Harmen Stoppels --- .../repos/builtin/packages/enzyme/package.py | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 var/spack/repos/builtin/packages/enzyme/package.py diff --git a/var/spack/repos/builtin/packages/enzyme/package.py b/var/spack/repos/builtin/packages/enzyme/package.py new file mode 100644 index 00000000000..2e43e2c9703 --- /dev/null +++ b/var/spack/repos/builtin/packages/enzyme/package.py @@ -0,0 +1,69 @@ + +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Enzyme(CMakePackage): + """ + The Enzyme project is a tool for performing reverse-mode automatic + differentiation (AD) of statically-analyzable LLVM IR. + This allows developers to use Enzyme to automatically create gradients + of their source code without much additional work. + """ + + homepage = "https://enzyme.mit.edu" + url = "https://github.com/wsmoses/Enzyme/archive/v0.0.15.tar.gz" + list_url = "https://github.com/wsmoses/Enzyme/releases" + git = "https://github.com/wsmoses/Enzyme" + + maintainers = ['wsmoses', 'vchuravy', 'tgymnich'] + + root_cmakelists_dir = 'enzyme' + + version('main', branch='main') + version('0.0.15', + sha256='1ec27db0d790c4507b2256d851b256bf7e074eec933040e9e375d6e352a3c159') + version('0.0.14', + sha256='740641eeeeadaf47942ac88cc52e62ddc0e8c25767a501bed36ec241cf258b8d') + version('0.0.13', + sha256='d4a53964ec1f763772db2c56e6734269b7656c8b2ecd41fa7a41315bcd896b5a') + + variant( + 'build_type', + default='Release', + description='CMake build type', + values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel') + ) + + depends_on('llvm@7:12') + depends_on('cmake@3.9:', type='build') + + def cmake_args(self): + spec = self.spec + args = [ + "-DLLVM_DIR=" + spec["llvm"].prefix.lib + "/cmake/llvm" + ] + return args + + @property + def libs(self): + ver = self.spec['llvm'].version.up_to(1) + libs = [ + 'LLVMEnzyme-{0}'.format(ver), + 'ClangEnzyme-{0}'.format(ver) + ] + return find_libraries(libs, root=self.prefix, recursive=True) + + def setup_dependent_build_environment(self, env, dependent_spec): + # Get the LLVMEnzyme and ClangEnzyme lib paths + llvm, clang = self.libs + + if "LLVMEnzyme-" in clang: + llvm, clang = clang, llvm + + env.set('LLVMENZYME', llvm) + env.set('CLANGENZYME', clang) From 08629d8fb4ee4c29875dc3c8054eb0796d74fae9 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Tue, 20 Jul 2021 13:05:40 +0200 Subject: [PATCH 163/289] Add HPX 1.7.0 (#24880) --- var/spack/repos/builtin/packages/hpx/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/hpx/package.py b/var/spack/repos/builtin/packages/hpx/package.py index a2230c605cf..0269a4b47b6 100644 --- a/var/spack/repos/builtin/packages/hpx/package.py +++ b/var/spack/repos/builtin/packages/hpx/package.py @@ -18,6 +18,7 @@ class Hpx(CMakePackage, CudaPackage): version('master', git='https://github.com/STEllAR-GROUP/hpx.git', branch='master') version('stable', git='https://github.com/STEllAR-GROUP/hpx.git', tag='stable') + version('1.7.0', sha256='05099b860410aa5d8a10d6915b1a8818733aa1aa2d5f2b9774730ca7e6de5fac') version('1.6.0', sha256='4ab715613c1e1808edc93451781cc9bc98feec4e422ccd4322858a680f6d9017') version('1.5.1', sha256='b2f9358ce2a9446b9d8fb1998c30913e7199b007aa82e46d0aa05c763331c635') version('1.5.0', sha256='de2901d8ae017592c513e0af9cf58de295abc9802e55ece00424cbd8a3801920') @@ -96,6 +97,11 @@ class Hpx(CMakePackage, CudaPackage): _msg_generic_coroutines = 'This platform requires +generic_coroutines' conflicts('~generic_coroutines', when='platform=darwin', msg=_msg_generic_coroutines) + # Asio + depends_on('asio cxxstd=11', when='@1.7: cxxstd=11') + depends_on('asio cxxstd=14', when='@1.7: cxxstd=14') + depends_on('asio cxxstd=17', when='@1.7: cxxstd=17') + # CXX Standard depends_on('boost cxxstd=11', when='cxxstd=11') depends_on('boost cxxstd=14', when='cxxstd=14') From df10ffe20d927cf5ce1f0b9b61e36c02856f5ca9 Mon Sep 17 00:00:00 2001 From: Olivier Cessenat Date: Tue, 20 Jul 2021 13:17:40 +0200 Subject: [PATCH 164/289] New Package: visit-unv (#22904) --- .../builtin/packages/visit-unv/package.py | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 var/spack/repos/builtin/packages/visit-unv/package.py diff --git a/var/spack/repos/builtin/packages/visit-unv/package.py b/var/spack/repos/builtin/packages/visit-unv/package.py new file mode 100644 index 00000000000..6bcac129648 --- /dev/null +++ b/var/spack/repos/builtin/packages/visit-unv/package.py @@ -0,0 +1,83 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os +import re + +from spack import * + + +class VisitUnv(CMakePackage): + """This is the UNV Plug-In for VisIt.""" + + # These settings are exactly those of VisIt + homepage = "https://wci.llnl.gov/simulation/computer-codes/visit/" + git = "https://github.com/visit-dav/visit.git" + url = "https://github.com/visit-dav/visit/releases/download/v3.1.1/visit3.1.1.tar.gz" + + maintainers = ['cyrush', 'cessenat'] + + # Here we provide a local file that contains only the plugin in a flat directory + version('local', url='file://{0}/visit-unv.tgz'.format(os.getcwd())) + # Below we copy the VisIt paths: + version('develop', branch='develop') + version('3.2.0', sha256='7328fd8592f9aaf17bf79ffcffd7eaec77773926b0843d9053f39c2190dbe1c0') + version('3.1.4', sha256='be20d9acf56f0599e3c511709f48d8d3b232a57425f69d2bd1e2df1eccb84c93') + version('3.1.1', sha256='0b60ac52fd00aff3cf212a310e36e32e13ae3ca0ddd1ea3f54f75e4d9b6c6cf0') + version('3.0.1', sha256='a506d4d83b8973829e68787d8d721199523ce7ec73e7594e93333c214c2c12bd') + version('2.13.3', sha256='cf0b3d2e39e1cd102dd886d3ef6da892733445e362fc28f24d9682012cccf2e5') + version('2.13.0', sha256='716644b8e78a00ff82691619d4d1e7a914965b6535884890b667b97ba08d6a0f') + version('2.12.3', sha256='2dd351a291ee3e79926bc00391ca89b202cfa4751331b0fdee1b960c7922161f') + version('2.12.2', sha256='55897d656ac2ea4eb87a30118b2e3963d6c8a391dda0790268426a73e4b06943') + version('2.10.3', sha256='05018215c4727eb42d47bb5cc4ff937b2a2ccaca90d141bc7fa426a0843a5dbc') + version('2.10.2', sha256='89ecdfaf197ef431685e31b75628774deb6cd75d3e332ef26505774403e8beff') + version('2.10.1', sha256='6b53dea89a241fd03300a7a3a50c0f773e2fb8458cd3ad06816e9bd2f0337cd8') + + depends_on('cmake', type='build') + depends_on('visit') + + extends('visit') + + build_targets = ['VERBOSE=1'] + phases = ['cmake', 'build'] + extname = 'unv' + + @property + def root_cmakelists_dir(self): + if '@local' not in self.spec: + return join_path('src', 'databases', self.extname) + else: + return '.' + + @property + def build_directory(self): + return self.root_cmakelists_dir + + @run_before('cmake') + def run_xml2cmake(self): + visit = self.spec['visit'] + args = ['-v', str(visit.version), '-clobber', '-public', self.extname + '.xml'] + with working_dir(self.root_cmakelists_dir): + # Regenerate the public cmake files + if os.path.exists("CMakeLists.txt"): + os.unlink('CMakeLists.txt') + which("xml2cmake")(*args) + # spack extension activate : alter VISIT_PLUGIN_DIR ; + # xml2cmake should have set it to visit prefix but it can + # happen the directory is an alias. + # In that case we match version/smth/plugins. + mstr = None + mstr1 = r'^SET[(]VISIT_PLUGIN_DIR\s+\"{0}(.+)\"[)]'.format(visit.prefix) + mstr2 = r'^SET[(]VISIT_PLUGIN_DIR\s+\".+({0}.+?{1})\"[)]'.format( + join_path(os.sep, visit.version, ''), join_path(os.sep, 'plugins')) + with open('CMakeLists.txt', 'r') as file: + for line in file: + if re.search(mstr1, line): + mstr = mstr1 + elif re.search(mstr2, line): + mstr = mstr2 + if mstr is not None: + filter_file(mstr, r'SET(VISIT_PLUGIN_DIR "{0}\1")'.format(prefix), + 'CMakeLists.txt') From a2ebeb8e76d6c067a60f734cc81ebfdd1fcb75a7 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 20 Jul 2021 13:30:32 +0200 Subject: [PATCH 165/289] boost: Add version ranges for macOS GCC patch (#24969) --- var/spack/repos/builtin/packages/boost/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index 2b6e587b57e..2d0191d7c93 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -280,7 +280,7 @@ def libs(self): # Allow building context asm sources with GCC on Darwin # See https://github.com/spack/spack/pull/24889 # and https://github.com/boostorg/context/issues/177 - patch("context-macho-gcc.patch", when="+context platform=darwin %gcc") + patch("context-macho-gcc.patch", when="@1.65:1.76 +context platform=darwin %gcc") def patch(self): # Disable SSSE3 and AVX2 when using the NVIDIA compiler From aa9f5601289a33e918cc6a1e157f9d6a2bf54a9d Mon Sep 17 00:00:00 2001 From: Sreenivasa Murthy Kolam <67086238+srekolam@users.noreply.github.com> Date: Tue, 20 Jul 2021 05:13:36 -0700 Subject: [PATCH 166/289] update hip-rocclr recipe and fix dangling pointer in rocm-smi-lib (#24603) --- .../builtin/packages/hip-rocclr/package.py | 85 ++++++------------- .../builtin/packages/rocm-smi-lib/package.py | 4 + 2 files changed, 31 insertions(+), 58 deletions(-) diff --git a/var/spack/repos/builtin/packages/hip-rocclr/package.py b/var/spack/repos/builtin/packages/hip-rocclr/package.py index a82d19ee14b..a62d6657470 100644 --- a/var/spack/repos/builtin/packages/hip-rocclr/package.py +++ b/var/spack/repos/builtin/packages/hip-rocclr/package.py @@ -59,65 +59,34 @@ def url_for_version(self, version): placement='opencl-on-vdi', when='@3.5.0') - resource(name='opencl-on-vdi', - url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-3.7.0.tar.gz', - sha256='283e1dfe4c3d2e8af4d677ed3c20e975393cdb0856e3ccd77b9c7ed2a151650b', - expand=True, - destination='', - placement='opencl-on-vdi', - when='@3.7.0') + # Add opencl sources thru the below + for d_version, d_shasum in [ + ('4.2.0', '18133451948a83055ca5ebfb5ba1bd536ed0bcb611df98829f1251a98a38f730'), + ('4.1.0', '0729e6c2adf1e3cf649dc6e679f9cb936f4f423f4954ad9852857c0a53ef799c'), + ('4.0.0', 'd43ea5898c6b9e730b5efabe8367cc136a9260afeac5d0fe85b481d625dd7df1'), + ('3.10.0', '3aa9dc5a5f570320b04b35ee129ce9ff21062d2770df934c6c307913f975e93d'), + ('3.9.0', '286ff64304905384ce524cd8794c28aee216befd6c9267d4187a12e5a21e2daf'), + ('3.8.0', '7f75dd1abf3d771d554b0e7b0a7d915ab5f11a74962c92b013ee044a23c1270a'), + ('3.7.0', '283e1dfe4c3d2e8af4d677ed3c20e975393cdb0856e3ccd77b9c7ed2a151650b') + ]: + resource( + name='opencl-on-vdi', + url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-{0}.tar.gz'.format(d_version), + sha256=d_shasum, + expand=True, + destination='', + placement='opencl-on-vdi', + when='@{0}'.format(d_version) + ) - resource(name='opencl-on-vdi', - url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-3.8.0.tar.gz', - sha256='7f75dd1abf3d771d554b0e7b0a7d915ab5f11a74962c92b013ee044a23c1270a', - expand=True, - destination='', - placement='opencl-on-vdi', - when='@3.8.0') - - resource(name='opencl-on-vdi', - url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-3.9.0.tar.gz', - sha256='286ff64304905384ce524cd8794c28aee216befd6c9267d4187a12e5a21e2daf', - expand=True, - destination='', - placement='opencl-on-vdi', - when='@3.9.0') - - resource(name='opencl-on-vdi', - url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-3.10.0.tar.gz', - sha256='3aa9dc5a5f570320b04b35ee129ce9ff21062d2770df934c6c307913f975e93d', - expand=True, - destination='', - placement='opencl-on-vdi', - when='@3.10.0') - - resource(name='opencl-on-vdi', - url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-4.0.0.tar.gz', - sha256='d43ea5898c6b9e730b5efabe8367cc136a9260afeac5d0fe85b481d625dd7df1', - expand=True, - destination='', - placement='opencl-on-vdi', - when='@4.0.0') - - resource(name='opencl-on-vdi', - url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-4.1.0.tar.gz', - sha256='0729e6c2adf1e3cf649dc6e679f9cb936f4f423f4954ad9852857c0a53ef799c', - expand=True, - destination='', - placement='opencl-on-vdi', - when='@4.1.0') - resource(name='opencl-on-vdi', - url='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/archive/rocm-4.2.0.tar.gz', - sha256='18133451948a83055ca5ebfb5ba1bd536ed0bcb611df98829f1251a98a38f730', - expand=True, - destination='', - placement='opencl-on-vdi', - when='@4.2.0') - resource(name='opencl-on-vdi', - git='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git', - destination='', - placement='opencl-on-vdi', - when='@master') + resource( + name='opencl-on-vdi', + git='https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime.git', + destination='', + placement='opencl-on-vdi', + branch='main', + when='@master' + ) @run_after('install') def deploy_missing_files(self): diff --git a/var/spack/repos/builtin/packages/rocm-smi-lib/package.py b/var/spack/repos/builtin/packages/rocm-smi-lib/package.py index 53cae447114..00a6b57b403 100644 --- a/var/spack/repos/builtin/packages/rocm-smi-lib/package.py +++ b/var/spack/repos/builtin/packages/rocm-smi-lib/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os import shutil from spack import * @@ -45,3 +46,6 @@ def post_install(self): shutil.rmtree(self.prefix.lib) install_tree(self.prefix.rocm_smi, self.prefix) shutil.rmtree(self.prefix.rocm_smi) + os.remove(join_path(self.prefix.bin, 'rsmiBindings.py')) + symlink('../bindings/rsmiBindings.py', + join_path(self.prefix.bin, 'rsmiBindings.py')) From 3408d22df8acfd934795c6805b995b8e65e89f49 Mon Sep 17 00:00:00 2001 From: Marcus Boden Date: Tue, 20 Jul 2021 12:16:47 +0000 Subject: [PATCH 167/289] New package: Mash (#24833) Co-authored-by: Harmen Stoppels --- .../repos/builtin/packages/mash/package.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 var/spack/repos/builtin/packages/mash/package.py diff --git a/var/spack/repos/builtin/packages/mash/package.py b/var/spack/repos/builtin/packages/mash/package.py new file mode 100644 index 00000000000..bebcdd69af5 --- /dev/null +++ b/var/spack/repos/builtin/packages/mash/package.py @@ -0,0 +1,34 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Mash(AutotoolsPackage): + """ + Fast genome and metagenome distance estimation using MinHash. + """ + + homepage = "http://mash.readthedocs.org/" + url = "https://github.com/marbl/Mash/archive/refs/tags/v2.3.tar.gz" + + maintainers = ['marcusboden'] + + version('2.3', sha256='f96cf7305e010012c3debed966ac83ceecac0351dbbfeaa6cd7ad7f068d87fe1') + + conflicts('%gcc@11:', msg='mash cannot be build with gcc >= 11') + + depends_on("autoconf", type='build') + depends_on("automake", type='build') + depends_on("libtool", type='build') + depends_on("m4", type='build') + depends_on("capnproto") + depends_on("gsl") + + def configure_args(self): + args = [] + args.append("--with-capnp=" + self.spec['capnproto'].prefix) + args.append("--with-gsl=" + self.spec['gsl'].prefix) + return args From 5d0c7d4ba2c3cce32f134b7c7319e28defcb1899 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 20 Jul 2021 14:58:26 +0200 Subject: [PATCH 168/289] py-pybids: add new package (#24956) --- .../builtin/packages/py-pybids/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pybids/package.py diff --git a/var/spack/repos/builtin/packages/py-pybids/package.py b/var/spack/repos/builtin/packages/py-pybids/package.py new file mode 100644 index 00000000000..2706af23cd9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pybids/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPybids(PythonPackage): + """bids: interface with datasets conforming to BIDS""" + + homepage = "http://github.com/bids-standard/pybids" + pypi = "pybids/pybids-0.13.1.tar.gz" + + version('0.13.1', sha256='c920e1557e1dae8b671625d70cafbdc28437ba2822b2db9da4c2587a7625e3ba') + + depends_on('python@3.5:', type=('build', 'run')) + depends_on('py-setuptools@30.3.0:', type='build') + depends_on('py-numpy', type=('build', 'run')) + depends_on('py-scipy', type=('build', 'run')) + depends_on('py-nibabel@2.1:', type=('build', 'run')) + depends_on('py-pandas@0.23:', type=('build', 'run')) + depends_on('py-patsy', type=('build', 'run')) + depends_on('py-sqlalchemy@:1.3.999', type=('build', 'run')) + depends_on('py-bids-validator', type=('build', 'run')) + depends_on('py-num2words', type=('build', 'run')) + depends_on('py-click', type=('build', 'run')) From 889ece85ed4d9305a5b47863ee9579d67ff6a1b2 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Tue, 20 Jul 2021 14:58:54 +0200 Subject: [PATCH 169/289] py-annexremote: add new package (#24958) --- .../builtin/packages/py-annexremote/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-annexremote/package.py diff --git a/var/spack/repos/builtin/packages/py-annexremote/package.py b/var/spack/repos/builtin/packages/py-annexremote/package.py new file mode 100644 index 00000000000..8187b70fdc7 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-annexremote/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyAnnexremote(PythonPackage): + """git annex special remotes made easy.""" + + homepage = "https://github.com/Lykos153/AnnexRemote" + pypi = "annexremote/annexremote-1.5.0.tar.gz" + + version('1.5.0', sha256='92f32b6f5461cbaeefe0c60b32f9c1e0c1dbe4e57b8ee425affb56f4060f64ef') + + depends_on('py-setuptools', type='build') + depends_on('py-future', type=('build', 'run')) From c1567463b095074d9bc685f04281c8101082fcd9 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Tue, 20 Jul 2021 09:51:05 -0500 Subject: [PATCH 170/289] kassiopeia: new versions, updated cmake_args (#24964) Co-authored-by: Massimiliano Culpo --- .../builtin/packages/kassiopeia/package.py | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/var/spack/repos/builtin/packages/kassiopeia/package.py b/var/spack/repos/builtin/packages/kassiopeia/package.py index 20656a951e9..8050a2092aa 100644 --- a/var/spack/repos/builtin/packages/kassiopeia/package.py +++ b/var/spack/repos/builtin/packages/kassiopeia/package.py @@ -17,6 +17,9 @@ class Kassiopeia(CMakePackage): maintainers = ['wdconinc'] + version("main", branch="main") + version('3.7.7', sha256='b5f62b2e796fac57698794b46b63acbc47ce02010bd1f716996918a550b22a21') + version('3.7.6', sha256='fa20cf0f29ee2312bf96b07661d7b5c9303782d907671acd01032cc1f13edd55') version('3.7.5', sha256='8f28d08c7ef51e64221e0a4705f3cee3a5d738b8cdde5ce9fa58a3a0dd14ae05') version('3.7.4', sha256='c1514163a084530930be10dbe487fb1950ccbc9662a4a190bdecffbd84a71fd4') version('3.7.3', sha256='a8753585b9fa0903e1f5f821c4ced3cddd72792ad7e6075a7e25318f81ad9eaa') @@ -47,21 +50,15 @@ class Kassiopeia(CMakePackage): depends_on('opencl', when='+opencl') def cmake_args(self): - args = [] - if self.spec.satisfies('+vtk'): - args.append('-DKASPER_USE_VTK=ON') + if '+root' in self.spec: + cxxstd = self.spec['root'].variants['cxxstd'].value else: - args.append('-DKASPER_USE_VTK=OFF') - if self.spec.satisfies('+tbb'): - args.append('-DKASPER_USE_TBB=ON') - else: - args.append('-DKASPER_USE_TBB=OFF') - if self.spec.satisfies('+mpi'): - args.append('-DKEMField_USE_MPI=ON') - else: - args.append('-DKEMField_USE_MPI=OFF') - if self.spec.satisfies('+opencl'): - args.append('-DKEMField_USE_OPENCL=ON') - else: - args.append('-DKEMField_USE_OPENCL=OFF') + cxxstd = '14' + args = [ + self.define_from_variant("KASPER_USE_VTK", "vtk"), + self.define_from_variant("KASPER_USE_TBB", "tbb"), + self.define_from_variant("KEMField_USE_MPI", "mpi"), + self.define_from_variant("KEMField_USE_OPENCL", "opencl"), + self.define("CMAKE_CXX_STANDARD", cxxstd) + ] return args From 2fd24f8542cf62e456c904aa39045ed57f1060c8 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Tue, 20 Jul 2021 15:13:25 -0400 Subject: [PATCH 171/289] trilinos: fix boost variant/dependency error for minitensor (#24985) --- var/spack/repos/builtin/packages/trilinos/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 85dafa076f5..9531118f3cd 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -337,6 +337,9 @@ class Trilinos(CMakePackage, CudaPackage): conflicts('cxxstd=14', when='+wrapper ^cuda@6.5.14:8.0.61') conflicts('cxxstd=17', when='+wrapper ^cuda@6.5.14:10.2.89') + # Boost requires minitensor + conflicts('~boost', when='+minitensor') + # SCOREC requires shards, stk, and zoltan conflicts('+scorec', when='~mpi') conflicts('+scorec', when='~shards') @@ -375,7 +378,6 @@ class Trilinos(CMakePackage, CudaPackage): depends_on('parmetis', when='+scorec') depends_on('cgns', when='+cgns') depends_on('adios2', when='+adios2') - depends_on('boost', when='+minitensor') # Trilinos' Tribits config system is limited which makes it very tricky to # link Amesos with static MUMPS, see # https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html From 3724c78a25d9970be7e8dbc8bae36b350f3225f5 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Tue, 20 Jul 2021 14:38:13 -0500 Subject: [PATCH 172/289] petsc4py,slepc4py: update maintainers --- var/spack/repos/builtin/packages/py-petsc4py/package.py | 2 +- var/spack/repos/builtin/packages/py-slepc4py/package.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-petsc4py/package.py b/var/spack/repos/builtin/packages/py-petsc4py/package.py index d9150b31ea9..2b02c4f0f6e 100644 --- a/var/spack/repos/builtin/packages/py-petsc4py/package.py +++ b/var/spack/repos/builtin/packages/py-petsc4py/package.py @@ -14,7 +14,7 @@ class PyPetsc4py(PythonPackage): url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc4py-3.15.0.tar.gz" git = "https://gitlab.com/petsc/petsc.git" - maintainers = ['dalcinl', 'balay'] + maintainers = ['balay'] version('main', branch='main') version('3.15.2', sha256='d7ed1d79d88b35da563d25e733f276595ba538c52756225f79ba92e1cc4658d3') diff --git a/var/spack/repos/builtin/packages/py-slepc4py/package.py b/var/spack/repos/builtin/packages/py-slepc4py/package.py index 4598a62a082..80ea5eb0d64 100644 --- a/var/spack/repos/builtin/packages/py-slepc4py/package.py +++ b/var/spack/repos/builtin/packages/py-slepc4py/package.py @@ -14,7 +14,7 @@ class PySlepc4py(PythonPackage): url = "https://slepc.upv.es/download/distrib/slepc4py-3.15.1.tar.gz" git = "https://gitlab.com/slepc/slepc.git" - maintainers = ['dalcinl', 'joseeroman', 'balay'] + maintainers = ['joseeroman', 'balay'] version('main', branch='main') version('3.15.1', sha256='bcdab6d2101ae00e189f4b33072805358cee2dda806a6b6a8e3c2f1b9f619dfd') From b46061aa4265e2b461cfb6dc731fed7d562e31c8 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 03:18:59 +0200 Subject: [PATCH 173/289] py-beautifulsoup4: add 4.9.3 (#24974) --- .../repos/builtin/packages/py-beautifulsoup4/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py b/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py index db9b938ae09..ac89f255f53 100644 --- a/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py +++ b/var/spack/repos/builtin/packages/py-beautifulsoup4/package.py @@ -14,10 +14,19 @@ class PyBeautifulsoup4(PythonPackage): homepage = "https://www.crummy.com/software/BeautifulSoup" pypi = "beautifulsoup4/beautifulsoup4-4.8.0.tar.gz" + version('4.9.3', sha256='84729e322ad1d5b4d25f805bfa05b902dd96450f43842c4e99067d5e1369eb25') version('4.8.0', sha256='25288c9e176f354bf277c0a10aa96c782a6a18a17122dba2e8cec4a97e03343b') version('4.5.3', sha256='b21ca09366fa596043578fd4188b052b46634d22059e68dd0077d9ee77e08a3e') version('4.5.1', sha256='3c9474036afda9136aac6463def733f81017bf9ef3510d25634f335b0c87f5e1') version('4.4.1', sha256='87d4013d0625d4789a4f56b8d79a04d5ce6db1152bb65f1d39744f7709a366b4') + variant('lxml', default=False, description='Enable lxml parser') + variant('html5lib', default=False, description='Enable html5lib parser') + depends_on('py-setuptools', type='build') + depends_on('py-soupsieve@1.3:', when='@4.9.0: ^python@3:', type=('build', 'run')) + depends_on('py-soupsieve@1.3:1.99', when='@4.9.0: ^python@:2.8', type=('build', 'run')) depends_on('py-soupsieve@1.2:', when='@4.7.0:', type=('build', 'run')) + + depends_on('py-lxml', when='+lxml', type=('build', 'run')) + depends_on('py-html5lib', when='+html5lib', type=('build', 'run')) From 72fb3f768f3d01bfd89298871ef2256f9b588e81 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 03:22:14 +0200 Subject: [PATCH 174/289] py-pyperclip: add 1.8.2 and missing xclip dependency (#24970) --- var/spack/repos/builtin/packages/py-pyperclip/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-pyperclip/package.py b/var/spack/repos/builtin/packages/py-pyperclip/package.py index 1d0ac973cfc..f1947cc507c 100644 --- a/var/spack/repos/builtin/packages/py-pyperclip/package.py +++ b/var/spack/repos/builtin/packages/py-pyperclip/package.py @@ -12,6 +12,8 @@ class PyPyperclip(PythonPackage): homepage = "https://github.com/asweigart/pyperclip" pypi = "pyperclip/pyperclip-1.7.0.tar.gz" + version('1.8.2', sha256='105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57') version('1.7.0', sha256='979325468ccf682104d5dcaf753f869868100631301d3e72f47babdea5700d1c') depends_on('py-setuptools', type='build') + depends_on('xclip', type='run', when='platform=linux') From d4f498db7c2cb5da0ad0202d7a4b6a919ac896b3 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 03:24:18 +0200 Subject: [PATCH 175/289] py-rply: add new package (#24989) --- .../repos/builtin/packages/py-rply/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-rply/package.py diff --git a/var/spack/repos/builtin/packages/py-rply/package.py b/var/spack/repos/builtin/packages/py-rply/package.py new file mode 100644 index 00000000000..7fd1505a85e --- /dev/null +++ b/var/spack/repos/builtin/packages/py-rply/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyRply(PythonPackage): + """A pure Python Lex/Yacc that works with RPython.""" + + homepage = "https://github.com/alex/rply/" + pypi = "rply/rply-0.7.8.tar.gz" + + version('0.7.8', sha256='2a808ac25a4580a9991fc304d64434e299a8fc75760574492f242cbb5bb301c9') + + depends_on('py-setuptools', type='build') + depends_on('py-appdirs', type=('build', 'run')) From 30e559592adcf3fd09d1141df8317ddca400567b Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 03:25:50 +0200 Subject: [PATCH 176/289] py-exifread: add new package (#24980) --- .../builtin/packages/py-exifread/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-exifread/package.py diff --git a/var/spack/repos/builtin/packages/py-exifread/package.py b/var/spack/repos/builtin/packages/py-exifread/package.py new file mode 100644 index 00000000000..05e104f1646 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-exifread/package.py @@ -0,0 +1,17 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyExifread(PythonPackage): + """Read Exif metadata from tiff and jpeg files.""" + + homepage = "https://github.com/ianare/exif-py" + pypi = "ExifRead/ExifRead-2.3.2.tar.gz" + + version('2.3.2', sha256='a0f74af5040168d3883bbc980efe26d06c89f026dc86ba28eb34107662d51766') + + depends_on('py-setuptools', type='build') From 93b694f97386dd36f36b0a37c3d40bbeebf395b6 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 03:33:13 +0200 Subject: [PATCH 177/289] py-mutagen: add new package (#24979) --- .../builtin/packages/py-mutagen/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-mutagen/package.py diff --git a/var/spack/repos/builtin/packages/py-mutagen/package.py b/var/spack/repos/builtin/packages/py-mutagen/package.py new file mode 100644 index 00000000000..3befa29a163 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mutagen/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyMutagen(PythonPackage): + """Read and write audio tags for many formats.""" + + homepage = "https://github.com/quodlibet/mutagen" + pypi = "mutagen/mutagen-1.45.1.tar.gz" + + version('1.45.1', sha256='6397602efb3c2d7baebd2166ed85731ae1c1d475abca22090b7141ff5034b3e1') + + depends_on('python@3.5:3.99', type=('build', 'run')) + depends_on('py-setuptools', type='build') From 3be54d4aabbe8d5b1ad5f3a57bcc876c8b35f5d9 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 03:34:25 +0200 Subject: [PATCH 178/289] py-vcrpy: add new package (#24978) --- .../builtin/packages/py-vcrpy/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-vcrpy/package.py diff --git a/var/spack/repos/builtin/packages/py-vcrpy/package.py b/var/spack/repos/builtin/packages/py-vcrpy/package.py new file mode 100644 index 00000000000..120e9b8767f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-vcrpy/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyVcrpy(PythonPackage): + """Automatically mock your HTTP interactions to simplify and speed up testing.""" + + homepage = "https://github.com/kevin1024/vcrpy" + pypi = "vcrpy/vcrpy-4.1.1.tar.gz" + + version('4.1.1', sha256='57095bf22fc0a2d99ee9674cdafebed0f3ba763018582450706f7d3a74fff599') + + depends_on('python@3.5:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-pyyaml', type=('build', 'run')) + depends_on('py-wrapt', type=('build', 'run')) + depends_on('py-six@1.5:', type=('build', 'run')) + depends_on('py-yarl', when='^python@3.6:', type=('build', 'run')) + depends_on('py-yarl@:1.3', when='^python@3.5', type=('build', 'run')) From c543b86e81d3a6072cb4c6188d6b083e9342d758 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 03:37:09 +0200 Subject: [PATCH 179/289] py-httpretty: add new package (#24977) --- .../builtin/packages/py-httpretty/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-httpretty/package.py diff --git a/var/spack/repos/builtin/packages/py-httpretty/package.py b/var/spack/repos/builtin/packages/py-httpretty/package.py new file mode 100644 index 00000000000..03980d7b236 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-httpretty/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyHttpretty(PythonPackage): + """HTTP client mock for Python.""" + + homepage = "https://httpretty.readthedocs.io/en/latest/" + pypi = "httpretty/httpretty-1.1.3.tar.gz" + + version('1.1.3', sha256='229ade39175ea4324e767f29dc24e5f846fbc72bf80e1a919b2547a6574ff601') + + depends_on('python@3:', type=('build', 'run')) + depends_on('py-setuptools', type='build') From 5ec52fc3f8ffde94803c9b31d47d037741e37871 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 03:38:17 +0200 Subject: [PATCH 180/289] py-flask-restful: add new package (#24875) --- .../packages/py-flask-restful/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-flask-restful/package.py diff --git a/var/spack/repos/builtin/packages/py-flask-restful/package.py b/var/spack/repos/builtin/packages/py-flask-restful/package.py new file mode 100644 index 00000000000..0a56189471f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-flask-restful/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyFlaskRestful(PythonPackage): + """Simple framework for creating REST APIs""" + + homepage = "https://www.github.com/flask-restful/flask-restful/" + pypi = "Flask-RESTful/Flask-RESTful-0.3.8.tar.gz" + + version('0.3.9', sha256='ccec650b835d48192138c85329ae03735e6ced58e9b2d9c2146d6c84c06fa53e') + + depends_on('py-setuptools', type='build') + depends_on('py-aniso8601@0.82:', type=('build', 'run')) + depends_on('py-flask@0.8:', type=('build', 'run')) + depends_on('py-six@1.3.0:', type=('build', 'run')) + depends_on('py-pytz', type=('build', 'run')) From af806a8c1e310f6fb12b498892e212e2b8282c74 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 03:43:18 +0200 Subject: [PATCH 181/289] py-rnc2rng: add new package (#24990) --- .../builtin/packages/py-rnc2rng/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-rnc2rng/package.py diff --git a/var/spack/repos/builtin/packages/py-rnc2rng/package.py b/var/spack/repos/builtin/packages/py-rnc2rng/package.py new file mode 100644 index 00000000000..d9282d36b37 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-rnc2rng/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyRnc2rng(PythonPackage): + """RELAX NG Compact to regular syntax conversion library.""" + + homepage = "https://github.com/djc/rnc2rng" + pypi = "rnc2rng/rnc2rng-2.6.5.tar.gz" + + version('2.6.5', sha256='d354afcf0bf8e3b1e8f8d37d71a8fe5b1c0cf75cbd4b71364a9d90b5108a16e5') + + depends_on('py-setuptools', type='build') + depends_on('py-rply', type=('build', 'run')) From f6d9a1876ac40d3e70f61627d648dd940116f9cb Mon Sep 17 00:00:00 2001 From: Chris White Date: Wed, 21 Jul 2021 00:46:34 -0700 Subject: [PATCH 182/289] add new blt version (#25003) --- var/spack/repos/builtin/packages/blt/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/blt/package.py b/var/spack/repos/builtin/packages/blt/package.py index 372f6a92b05..a461a5d4428 100644 --- a/var/spack/repos/builtin/packages/blt/package.py +++ b/var/spack/repos/builtin/packages/blt/package.py @@ -18,10 +18,11 @@ class Blt(Package): version('develop', branch='develop') version('main', branch='main') - # Note: 0.4.0 contains a breaking change to BLT created targets + # Note: 0.4.0+ contains a breaking change to BLT created targets # if you export targets this could cause problems in downstream # projects if not handled properly. More info here: # https://llnl-blt.readthedocs.io/en/develop/tutorial/exporting_targets.html + version('0.4.1', sha256='16cc3e067ddcf48b99358107e5035a17549f52dcc701a35cd18a9d9f536826c1') version('0.4.0', sha256='f3bc45d28b9b2eb6df43b75d4f6f89a1557d73d012da7b75bac1be0574767193') version('0.3.6', sha256='6276317c29e7ff8524fbea47d9288ddb40ac06e9f9da5e878bf9011e2c99bf71') version('0.3.5', sha256='68a1c224bb9203461ae6f5ab0ff3c50b4a58dcce6c2d2799489a1811f425fb84') From ad16eeb9afe1238f77212d8ae1b8bcebba3bb5ab Mon Sep 17 00:00:00 2001 From: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> Date: Wed, 21 Jul 2021 01:58:38 -0700 Subject: [PATCH 183/289] Ascent: removed redundant cuda variant (#24576) --- var/spack/repos/builtin/packages/ascent/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/ascent/package.py b/var/spack/repos/builtin/packages/ascent/package.py index 2dc5dff55bf..16226a36208 100644 --- a/var/spack/repos/builtin/packages/ascent/package.py +++ b/var/spack/repos/builtin/packages/ascent/package.py @@ -76,7 +76,6 @@ class Ascent(Package, CudaPackage): variant("openmp", default=(sys.platform != 'darwin'), description="build openmp support") - variant("cuda", default=False, description="Build cuda support") variant("mfem", default=False, description="Build MFEM filter support") variant("adios", default=False, description="Build Adios filter support") variant("dray", default=False, description="Build with Devil Ray support") From cb53a9cc14aedb8b8d066599efd74d4dc6dbfd04 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 21 Jul 2021 05:02:48 -0400 Subject: [PATCH 184/289] gperftools: New version 2.9.1 (#24997) --- var/spack/repos/builtin/packages/gperftools/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/gperftools/package.py b/var/spack/repos/builtin/packages/gperftools/package.py index 908ef57fe3d..cfe07715f3f 100644 --- a/var/spack/repos/builtin/packages/gperftools/package.py +++ b/var/spack/repos/builtin/packages/gperftools/package.py @@ -15,6 +15,7 @@ class Gperftools(AutotoolsPackage): homepage = "https://github.com/gperftools/gperftools" url = "https://github.com/gperftools/gperftools/releases/download/gperftools-2.7/gperftools-2.7.tar.gz" + version('2.9.1', sha256='ea566e528605befb830671e359118c2da718f721c27225cbbc93858c7520fee3') version('2.8.1', sha256='12f07a8ba447f12a3ae15e6e3a6ad74de35163b787c0c7b76288d7395f2f74e0') version('2.7', sha256='1ee8c8699a0eff6b6a203e59b43330536b22bbcbe6448f54c7091e5efb0763c9') version('2.4', sha256='982a37226eb42f40714e26b8076815d5ea677a422fb52ff8bfca3704d9c30a2d') From 669769c090c0e7203aecbaebf000a9e73b2c8643 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 14:11:21 +0200 Subject: [PATCH 185/289] exempi: add new package (#24982) --- .../repos/builtin/packages/exempi/package.py | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 var/spack/repos/builtin/packages/exempi/package.py diff --git a/var/spack/repos/builtin/packages/exempi/package.py b/var/spack/repos/builtin/packages/exempi/package.py new file mode 100644 index 00000000000..4f1ddff54a1 --- /dev/null +++ b/var/spack/repos/builtin/packages/exempi/package.py @@ -0,0 +1,35 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Exempi(AutotoolsPackage): + """exempi is a port of Adobe XMP SDK to work on UNIX and to be build with + GNU automake. + + It includes XMPCore and XMPFiles, libexempi, a C-based API and exempi + a command line tool. + """ + + homepage = "http://libopenraw.freedesktop.org/wiki/Exempi" + url = "https://libopenraw.freedesktop.org/download/exempi-2.5.2.tar.bz2" + + version('2.5.2', sha256='52f54314aefd45945d47a6ecf4bd21f362e6467fa5d0538b0d45a06bc6eaaed5') + + depends_on('zlib') + depends_on('iconv') + depends_on('boost@1.48.0:') + depends_on('pkgconfig') + + conflicts('%gcc@:4.5') + + def configure_args(self): + args = ['--with-boost={0}'.format(self.spec['boost'].prefix)] + + if self.spec.satisfies('polatform=darwin'): + args += ['--with-darwinports', '--with-fink'] + + return args From 78a5e987212240395eb99171ff37712e6fc170d7 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 14:12:47 +0200 Subject: [PATCH 186/289] py-citeproc-py: add new package (#25005) --- .../packages/py-citeproc-py/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-citeproc-py/package.py diff --git a/var/spack/repos/builtin/packages/py-citeproc-py/package.py b/var/spack/repos/builtin/packages/py-citeproc-py/package.py new file mode 100644 index 00000000000..af5311cf4bc --- /dev/null +++ b/var/spack/repos/builtin/packages/py-citeproc-py/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyCiteprocPy(PythonPackage): + """Citations and bibliography formatter.""" + + homepage = "https://github.com/brechtm/citeproc-py" + pypi = "citeproc-py/citeproc-py-0.6.0.tar.gz" + + version('0.6.0', sha256='d9e3a224f936fe2e5033b5d9ffdacab769cedb61d96c4e0cf2f0b488f1d24b4e') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-rnc2rng@2.6.1,2.6.3:', type='build') + depends_on('py-lxml', type=('build', 'run')) From 04c5582eb2f4f69e538c304a8a774415226d78e9 Mon Sep 17 00:00:00 2001 From: Robert Underwood Date: Wed, 21 Jul 2021 08:17:25 -0400 Subject: [PATCH 187/289] sz: add v2.1.12 (#25004) --- var/spack/repos/builtin/packages/sz/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/sz/package.py b/var/spack/repos/builtin/packages/sz/package.py index bd743ed4f10..9972aafbbe8 100644 --- a/var/spack/repos/builtin/packages/sz/package.py +++ b/var/spack/repos/builtin/packages/sz/package.py @@ -15,6 +15,7 @@ class Sz(CMakePackage): maintainers = ['disheng222', 'robertu94'] version('master', branch='master') + version('2.1.12', sha256='3712b2cd7170d1511569e48a208f02dfb72ecd7ad053c321e2880b9083e150de') version('2.1.11.1', sha256='e6fa5c969b012782b1e5e9fbd1cd7d1c0ace908d9ec982e78b2910ec5c2161ac') version('2.1.11', sha256='85b8ef99344a3317ba9ee63ca4b9d99a51d1832d4d8880e01c7c56b3a69cacc9') version('2.1.10', sha256='3aba7619bdb5412218f162696f946c9d3a3df5acf128ddc685b21e45c11f6ae3', From 1ae760ef319293118ff53088b96f6f06eb40ed88 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 21 Jul 2021 08:17:48 -0400 Subject: [PATCH 188/289] ssht: add v1.4.0 (#25001) --- var/spack/repos/builtin/packages/ssht/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/ssht/package.py b/var/spack/repos/builtin/packages/ssht/package.py index ed05965812d..db8bb435be6 100644 --- a/var/spack/repos/builtin/packages/ssht/package.py +++ b/var/spack/repos/builtin/packages/ssht/package.py @@ -21,6 +21,7 @@ class Ssht(CMakePackage): maintainers = ['eschnett'] + version('1.4.0', sha256='b33f1b763a240df773a1900139aad6f6b5c676bb2b64a8c1062077fd95c08769') version('1.3.7', sha256='947c11b104734acb124171ff5115d14279b4d09bc297ac989204633919df422e') version('1.3.6', sha256='db652e0f550229a630643bbf4bdb270def25c158be5ccdcf594a24fd8054430d') version('1.3.5', sha256='2f71690cbd00f4969d7377e586022397bfb8efb107f7b13bf849a65e61362350') From 7c5f48c99bffe3878e4e75177801d396c28f7cc5 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 21 Jul 2021 08:18:36 -0400 Subject: [PATCH 189/289] lorene: Use correct library names of dependencies (#25000) Query `spec[...].libs` to find out library flags and names of dependencies. Also define `libs` property. --- .../repos/builtin/packages/lorene/package.py | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/lorene/package.py b/var/spack/repos/builtin/packages/lorene/package.py index daf29674182..d8cef6630ee 100644 --- a/var/spack/repos/builtin/packages/lorene/package.py +++ b/var/spack/repos/builtin/packages/lorene/package.py @@ -30,6 +30,7 @@ class Lorene(MakefilePackage): variant('bin_star', default=True, description='Build Bin_star solver for binary neutron star systems') + depends_on('blas') depends_on('fftw @3:', when='+fftw') depends_on('gsl') depends_on('lapack') @@ -38,12 +39,17 @@ class Lorene(MakefilePackage): parallel = False def edit(self, spec, prefix): + blas_libs = spec['lapack'].libs.link_flags fftw_incdirs = "-I" + spec['fftw'].prefix.include if '+fftw' in spec else "" fftw_libdirs = "-L" + spec['fftw'].prefix.lib if '+fftw' in spec else "" + fftw_libs = spec['fftw'].libs.link_flags gsl_incdirs = "-I" + spec['gsl'].prefix.include gsl_libdirs = "-L" + spec['gsl'].prefix.lib + gsl_libs = spec['gsl'].libs.link_flags + lapack_libs = spec['lapack'].libs.link_flags pgplot_incdirs = "-I" + spec['pgplot'].prefix.include pgplot_libdirs = "-L" + spec['pgplot'].prefix.lib + pgplot_libs = spec['pgplot'].libs.link_flags substitutions = [ ('@CXX@', self.compiler.cxx), @@ -59,10 +65,10 @@ def edit(self, spec, prefix): ('@RANLIB@', "ls"), ('@MAKEDEPEND@', "cpp $(INC) -M >> $(df).d $<"), ('@FFT_DIR@', "FFTW3"), - ('@LIB_CXX@', fftw_libdirs + " -lfftw3 -lgfortran"), - ('@LIB_GSL@', gsl_libdirs + " -lgsl -lgslcblas"), - ('@LIB_LAPACK@', "-llapack -lblas"), - ('@LIB_PGPLOT@', pgplot_libdirs + " -lcpgplot -lpgplot"), + ('@LIB_CXX@', fftw_libdirs + " " + fftw_libs + " -lgfortran"), + ('@LIB_GSL@', gsl_libdirs + " " + gsl_libs), + ('@LIB_LAPACK@', lapack_libs + " " + blas_libs), + ('@LIB_PGPLOT@', pgplot_libdirs + " " + pgplot_libs), ] local_settings_template = join_path( os.path.dirname(inspect.getmodule(self).__file__), @@ -94,3 +100,10 @@ def install(self, spec, prefix): mkdirp(prefix.bin) if '+bin_star' in spec: install_tree(join_path('Codes', 'Bin_star'), prefix.bin) + + @property + def libs(self): + shared = "+shared" in self.spec + return find_libraries( + "liblorene*", root=self.prefix, shared=shared, recursive=True + ) From 9b48827a1009d2aea89bd7dddde5d4550e9e60ca Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 21 Jul 2021 08:19:02 -0400 Subject: [PATCH 190/289] pgplot: add libs method (#24999) --- var/spack/repos/builtin/packages/pgplot/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/pgplot/package.py b/var/spack/repos/builtin/packages/pgplot/package.py index 1cad3f68c38..89a0513773f 100644 --- a/var/spack/repos/builtin/packages/pgplot/package.py +++ b/var/spack/repos/builtin/packages/pgplot/package.py @@ -82,3 +82,10 @@ def install(self, spec, prefix): install('libcpgplot.a', prefix.lib) install('libpgplot.a', prefix.lib) install('libpgplot.so', prefix.lib) + + @property + def libs(self): + shared = "+shared" in self.spec + return find_libraries( + "lib*pgplot", root=self.prefix, shared=shared, recursive=True + ) From 4e885b4358f2d7444c1959a92ed13b67a20d1c21 Mon Sep 17 00:00:00 2001 From: Brian Van Essen Date: Wed, 21 Jul 2021 05:20:53 -0700 Subject: [PATCH 191/289] lbann: update darwin build (#24998) * Updated the lbann package to not enabled OpenMP in BLAS package when working on Darwin systems. * Add the Sphinx RTD theme as an explicit dependency when building documentation --- var/spack/repos/builtin/packages/lbann/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/lbann/package.py b/var/spack/repos/builtin/packages/lbann/package.py index 772b117a1db..2471850790b 100644 --- a/var/spack/repos/builtin/packages/lbann/package.py +++ b/var/spack/repos/builtin/packages/lbann/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os +import sys from spack import * @@ -111,7 +112,8 @@ class Lbann(CMakePackage, CudaPackage, ROCmPackage): depends_on('hydrogen@1.5.0:', when='@:0.90,0.102:') # Add Hydrogen variants - depends_on('hydrogen +openmp +openmp_blas +shared +int64') + depends_on('hydrogen +openmp +shared +int64') + depends_on('hydrogen +openmp_blas', when=sys.platform != 'darwin') depends_on('hydrogen ~al', when='~al') depends_on('hydrogen +al', when='+al') depends_on('hydrogen ~cuda', when='~cuda') @@ -138,6 +140,7 @@ class Lbann(CMakePackage, CudaPackage, ROCmPackage): depends_on('dihydrogen@0.2.0:', when='@:0.90,0.102:') depends_on('dihydrogen +openmp', when='+dihydrogen') + depends_on('dihydrogen +openmp_blas', when=sys.platform != 'darwin') depends_on('dihydrogen ~cuda', when='+dihydrogen ~cuda') depends_on('dihydrogen +cuda', when='+dihydrogen +cuda') depends_on('dihydrogen ~al', when='+dihydrogen ~al') @@ -222,6 +225,7 @@ class Lbann(CMakePackage, CudaPackage, ROCmPackage): depends_on('protobuf+shared@3.10.0', when='@:0.90,0.99:') depends_on('py-breathe', type='build', when='+docs') + depends_on('py-sphinx-rtd-theme', type='build', when='+docs') depends_on('doxygen', type='build', when='+docs') depends_on('py-m2r', type='build', when='+docs') From 1c06ec0c11fc874f2203c783e69bd04322f298e2 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 21 Jul 2021 08:21:27 -0400 Subject: [PATCH 192/289] yaml-cpp: add v0.7.0 (#24996) --- var/spack/repos/builtin/packages/yaml-cpp/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/yaml-cpp/package.py b/var/spack/repos/builtin/packages/yaml-cpp/package.py index 7fa09c14f22..63d293ef981 100644 --- a/var/spack/repos/builtin/packages/yaml-cpp/package.py +++ b/var/spack/repos/builtin/packages/yaml-cpp/package.py @@ -14,8 +14,10 @@ class YamlCpp(CMakePackage): homepage = "https://github.com/jbeder/yaml-cpp" url = "https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.5.3.tar.gz" git = "https://github.com/jbeder/yaml-cpp.git" + maintainers = ['eschnett'] version('develop', branch='master') + version('0.7.0', sha256='43e6a9fcb146ad871515f0d0873947e5d497a1c9c60c58cb102a97b47208b7c3') version('0.6.3', sha256='77ea1b90b3718aa0c324207cb29418f5bced2354c2e483a9523d98c3460af1ed') version('0.6.2', sha256='e4d8560e163c3d875fd5d9e5542b5fd5bec810febdcba61481fe5fc4e6b1fd05') version('0.5.3', sha256='decc5beabb86e8ed9ebeb04358d5363a5c4f72d458b2c788cb2f3ac9c19467b2') From bb985e40dd259a105e807301375ce6be1ad1f39f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 21 Jul 2021 14:44:18 +0200 Subject: [PATCH 193/289] z3: disable python binding by default (#25007) z3 is a dependency of llvm and llvm-amdgpu, and when z3 python bindings are enabled it depends on py-setuptools as a run dependency. That's fine, except that py-setuptools now influences the hash of llvm/llvm-amdgpu, which can be very annoying when another package restricts the py-setuptools version -- you'll end up recompiling llvm for no good reason :(. --- var/spack/repos/builtin/packages/z3/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/z3/package.py b/var/spack/repos/builtin/packages/z3/package.py index fa434f00cec..7995f9491f0 100644 --- a/var/spack/repos/builtin/packages/z3/package.py +++ b/var/spack/repos/builtin/packages/z3/package.py @@ -19,7 +19,7 @@ class Z3(CMakePackage): version('4.8.7', sha256='8c1c49a1eccf5d8b952dadadba3552b0eac67482b8a29eaad62aa7343a0732c3') version('4.5.0', sha256='aeae1d239c5e06ac183be7dd853775b84698db1265cb2258e5918a28372d4a0c') - variant('python', default=True, description='Enable python binding') + variant('python', default=False, description='Enable python binding') depends_on('python', type='build', when='~python') depends_on('python', type=('build', 'run'), when='+python') depends_on('py-setuptools', type=('run'), when='+python') From 8a038ef64c128e2b75e2865e6d11e5f0b1445d24 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:08:12 +0200 Subject: [PATCH 194/289] py-duecredit: add new package (#25006) --- .../builtin/packages/py-duecredit/package.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-duecredit/package.py diff --git a/var/spack/repos/builtin/packages/py-duecredit/package.py b/var/spack/repos/builtin/packages/py-duecredit/package.py new file mode 100644 index 00000000000..ec1ac2ce6cb --- /dev/null +++ b/var/spack/repos/builtin/packages/py-duecredit/package.py @@ -0,0 +1,22 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyDuecredit(PythonPackage): + """Publications (and donations) tracer.""" + + homepage = "https://github.com/duecredit/duecredit" + pypi = "duecredit/duecredit-0.9.1.tar.gz" + + version('0.9.1', sha256='f6192ce9315b35f6a67174761291e61d0831e496e8ff4acbc061731e7604faf8') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-requests', type=('build', 'run')) + depends_on('py-citeproc-py@0.4:', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) + depends_on('py-importlib-metadata', when='python@:3.7', type=('build', 'run')) From 1cf52de47a8b17f5c4d94bc1e0a612dfcc390562 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:30:50 +0200 Subject: [PATCH 195/289] py-requests-ftp: add new package (#24975) --- .../packages/py-requests-ftp/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-requests-ftp/package.py diff --git a/var/spack/repos/builtin/packages/py-requests-ftp/package.py b/var/spack/repos/builtin/packages/py-requests-ftp/package.py new file mode 100644 index 00000000000..b61c3a51225 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-requests-ftp/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyRequestsFtp(PythonPackage): + """FTP Transport Adapter for Requests..""" + + homepage = "https://github.com/Lukasa/requests-ftp" + pypi = "requests-ftp/requests-ftp-0.3.1.tar.gz" + + version('0.3.1', sha256='7504ceb5cba8a5c0135ed738596820a78c5f2be92d79b29f96ba99b183d8057a') + + depends_on('py-setuptools', type='build') + depends_on('py-requests', type=('build', 'run')) From 9c96cc578ea3441e364bcee264b961947459ebb5 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:31:14 +0200 Subject: [PATCH 196/289] py-soupsieve: add 1.9.6 and 2.2.1 (#24973) --- var/spack/repos/builtin/packages/py-soupsieve/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-soupsieve/package.py b/var/spack/repos/builtin/packages/py-soupsieve/package.py index 4b147e9c0a3..534cd2007fe 100644 --- a/var/spack/repos/builtin/packages/py-soupsieve/package.py +++ b/var/spack/repos/builtin/packages/py-soupsieve/package.py @@ -12,7 +12,11 @@ class PySoupsieve(PythonPackage): homepage = "https://github.com/facelessuser/soupsieve" pypi = "soupsieve/soupsieve-1.9.3.tar.gz" + version('2.2.1', sha256='052774848f448cf19c7e959adf5566904d525f33a3f8b6ba6f6f8f26ec7de0cc') + version('1.9.6', sha256='7985bacc98c34923a439967c1a602dc4f1e15f923b6fcf02344184f86cc7efaa') version('1.9.3', sha256='8662843366b8d8779dec4e2f921bebec9afd856a5ff2e82cd419acc5054a1a92') + depends_on('python@3.6:', when='@2.2:', type=('build', 'run')) depends_on('py-setuptools', type='build') + depends_on('py-setuptools@42:', when='@2.2:', type='build') depends_on('py-backports-functools-lru-cache', when='^python@:2', type=('build', 'run')) From 7a458be3eb77891723dc8a5e803aee1870927947 Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Wed, 21 Jul 2021 14:32:52 +0100 Subject: [PATCH 197/289] tkrzw: added more versions and compression variant (#24953) --- .../repos/builtin/packages/tkrzw/package.py | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/var/spack/repos/builtin/packages/tkrzw/package.py b/var/spack/repos/builtin/packages/tkrzw/package.py index e86f4606290..2cd87b5a94f 100644 --- a/var/spack/repos/builtin/packages/tkrzw/package.py +++ b/var/spack/repos/builtin/packages/tkrzw/package.py @@ -14,6 +14,28 @@ class Tkrzw(AutotoolsPackage): git = "https://github.com/estraier/tkrzw.git" version('master', branch='master') + version('0.9.44', sha256='088ac619fbf7fc22c110674b3f8fe8d8573a1d7088e5616b268fd9f68ba25650') + version('0.9.43', sha256='60f7b579edb4f911ecaf35ff6c07f53b3d566424d8bf179b1991ade5071f0bbc') + version('0.9.42', sha256='135fb404d5a1b0bcee717f8e648a6f5ff140ec30069fecfde3b380f611356535') + version('0.9.41', sha256='76e68fb9a7c34eb927224a4a2b755ba4040e7066a42cf930c4f7bc2656c11d83') + version('0.9.40', sha256='3da034215aabeb371f7553a3e54d2b20ec63d3aa391cef3cef36ba40da7f4bb4') + version('0.9.39', sha256='a64eea9b05305877c936fb3b231f8924264319ee187545771c56fd08f67af6a8') + version('0.9.38', sha256='8036a40e2f4d13312ce33ed6bef0121525f1e7acf96900a5540ef3c633cfcf64') + version('0.9.37', sha256='cf1f1cd5d5e8826f44560ede56b135d396236d843fcf485f2c9feb5ca27e373b') + version('0.9.36', sha256='370e41b0b10c8b50f8dbe686a2fcb4efad53cfe26dd72739bc8f72ec3f480829') + version('0.9.35', sha256='5a1703a895f51948a3648ddbe7944dc28593c6746e93eadcd52bf0acd9ad5490') + version('0.9.34', sha256='0e236e5381400855f678154b794e9e7c33db7677f40e5241dd39e56fcfa640a7') + version('0.9.33', sha256='ea78e1a0042af8fa447184752e0ee0476a6074ffb77c880337b38d580b734abb') + version('0.9.32', sha256='be70ad680e5807406e1962133c97da5fdda7ed62df0b2e8d2446bd1daf728f03') + version('0.9.31', sha256='624f8c03282cd06f46fa4270eb4717680f4779a2b4338c1bbe8b2ea8fb2b48cb') + version('0.9.30', sha256='fea33337f0115f600afaedf872a828a4f516f4d86e6f6db7a648b03682b2499f') + version('0.9.29', sha256='120e5d471cd60f9f6c1b7eb25391dd055c4be12b8332124032b0489ad13c6989') + version('0.9.28', sha256='b2d363c7fa12a44d8f8d38cf97fbeb1bc068b2fcc1de7b628b2c20a22256fce3') + version('0.9.27', sha256='69d8e7cc998c7f33d6208df721bd5449f2bbf15b1af79186a17864ea36c522f0') + version('0.9.26', sha256='ee33d48b6aa071db37e4297b478bf5731d9a1289e83ca6c61afaafea78e13387') + version('0.9.25', sha256='6e2ba961d6963d1d0c572a3a3493dee655202007b133efc25f10b85dfc5f182d') + version('0.9.24', sha256='23ee06d5d1e359d7c40c834850751a55e5b19c34a4c086e90df1c7bfac7bd4ea') + version('0.9.23', sha256='43ba9e79b19fe782adf9abfaef7aa40811379ec98c3682313913d07cc9eb29c6') version('0.9.22', sha256='f892dcabc87d53086a7c1db129d05dda9c1e6b341d94d438daa8bf6a9e55407c') version('0.9.21', sha256='47211285fe41b5697d67eb4c22e850109acb4c657ebbaaf7eb815d3aac5bcc99') version('0.9.20', sha256='6750c8539a0c874c2ae673f852b47373f3d688365bd0ef97abb857b02a84095f') @@ -37,4 +59,30 @@ class Tkrzw(AutotoolsPackage): version('0.9.2', sha256='9040af148ab3f35c6f1d4c83f2eba8b68625dbd760f2c0537a9981dbc9bbc661') version('0.9.1', sha256='1062502f93d4a9b387372d89265a9ede1704c6bcadd9aac23f5fc8383e26045a') + variant('compression', + values=any_combination_of('zlib', 'lz4', 'lzma', 'zstd'), + description='List of supported compression backends') + + depends_on('zlib', when='compression=zlib') + depends_on('lz4', when='compression=lz4') + depends_on('xz', when='compression=lzma') # lzma.h is in the xz package, not in lzma + depends_on('zstd', when='compression=zstd') + + conflicts('compression=zlib', when='@:0.9.29') + conflicts('compression=lz4', when='@:0.9.29') + conflicts('compression=lzma', when='@:0.9.29') + conflicts('compression=zstd', when='@:0.9.29') conflicts('%gcc@:7.2.0') # need C++17 standard + + def configure_args(self): + spec = self.spec + args = [] + if 'compression=zlib' in spec: + args.append('--enable-zlib') + if 'compression=lz4' in spec: + args.append('--enable-lz4') + if 'compression=lzma' in spec: + args.append('--enable-lzma') + if 'compression=zstd' in spec: + args.append('--enable-zstd') + return args From 9237a9f2449d6f14390f8f5c5661d58444ba66b0 Mon Sep 17 00:00:00 2001 From: Manuela Kuhn <36827019+manuelakuhn@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:52:38 +0200 Subject: [PATCH 198/289] py-python-xmp-toolkit: add new package (#25008) --- .../packages/py-python-xmp-toolkit/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py diff --git a/var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py b/var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py new file mode 100644 index 00000000000..1c31bf028ea --- /dev/null +++ b/var/spack/repos/builtin/packages/py-python-xmp-toolkit/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPythonXmpToolkit(PythonPackage): + """Python XMP Toolkit for working with metadata.""" + + homepage = "https://github.com/python-xmp-toolkit/python-xmp-toolkit" + pypi = "python-xmp-toolkit/python-xmp-toolkit-2.0.1.tar.gz" + + version('2.0.1', sha256='f8d912946ff9fd46ed5c7c355aa5d4ea193328b3f200909ef32d9a28a1419a38') + + depends_on('python@2.6:2.7,3.3:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-pytz', type=('build', 'run')) + depends_on('exempi@2.2.0:', type=('build', 'run')) From a68abc15c5b1b8266130f765d1bee6290e71fa7c Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 21 Jul 2021 14:05:49 +0200 Subject: [PATCH 199/289] Fix bootstrap from sources #24095 introduced a couple of bugs, which are fixed here: 1. The module path is computed incorrectly for bootstrapped clingo 2. We remove too many paths for `sys.path` in case of failures --- lib/spack/spack/bootstrap.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/spack/spack/bootstrap.py b/lib/spack/spack/bootstrap.py index af12f095f76..92bbb2fa420 100644 --- a/lib/spack/spack/bootstrap.py +++ b/lib/spack/spack/bootstrap.py @@ -93,15 +93,14 @@ def make_module_available(module, spec=None, install=False): for ispec in installed_specs: # TODO: make sure run-environment is appropriate - module_path = os.path.join(ispec.prefix, - ispec['python'].package.site_packages_dir) + module_path = ispec['python'].package.get_python_lib(prefix=ispec.prefix) try: sys.path.append(module_path) __import__(module) return except ImportError: tty.warn("Spec %s did not provide module %s" % (ispec, module)) - sys.path = sys.path[:-2] + sys.path = sys.path[:-1] def _raise_error(module_name, module_spec): error_msg = 'cannot import module "{0}"'.format(module_name) @@ -118,14 +117,13 @@ def _raise_error(module_name, module_spec): spec.concretize() spec.package.do_install() - module_path = os.path.join(spec.prefix, - spec['python'].package.site_packages_dir) + module_path = spec['python'].package.get_python_lib(prefix=spec.prefix) try: sys.path.append(module_path) __import__(module) return except ImportError: - sys.path = sys.path[:-2] + sys.path = sys.path[:-1] _raise_error(module, spec) From 80592613adcb234a037e545ccae0def7b6a792e0 Mon Sep 17 00:00:00 2001 From: "Jonathan R. Madsen" Date: Wed, 21 Jul 2021 13:54:04 -0500 Subject: [PATCH 200/289] timemory package: add versions including 3.2.3; update options (#24825) * add variants: python hatchet/line-profiler support and likwid nvmon support * removed ompt_standalone/ompt_llvm variants --- .../builtin/packages/timemory/package.py | 454 ++++++++++++------ 1 file changed, 301 insertions(+), 153 deletions(-) diff --git a/var/spack/repos/builtin/packages/timemory/package.py b/var/spack/repos/builtin/packages/timemory/package.py index 814dbf4a344..4eeb39efc34 100644 --- a/var/spack/repos/builtin/packages/timemory/package.py +++ b/var/spack/repos/builtin/packages/timemory/package.py @@ -8,8 +8,9 @@ from spack import * -class Timemory(CMakePackage): - """Timing + Memory + Hardware Counter Utilities for C/C++/CUDA/Python""" +class Timemory(CMakePackage, PythonPackage): + '''Modular profiling toolkit and suite of libraries and tools + for C/C++/Fortran/CUDA/Python''' homepage = 'https://timemory.readthedocs.io/en/latest/' git = 'https://github.com/NERSC/timemory.git' @@ -17,21 +18,46 @@ class Timemory(CMakePackage): version('master', branch='master', submodules=True) version('develop', branch='develop', submodules=True) - version('3.0.1', commit='ef638e1cde90275ce7c0e12fc4902c27bcbdeefd', - submodules=True) - version('3.0.0', commit='b36b1673b2c6b7ff3126d8261bef0f8f176c7beb', - submodules=True) + version('3.2.3', commit='d535e478646e331a4c65cfd8c8f759c9a363ccc9', submodules=True) + version('3.2.2', commit='4725f4e4a3eea3b80b50a01ea088b5d5a1cf40ab', submodules=True) + version('3.2.1', commit='76ff978d9b1568b7f88a3de82bb84a2042003630', submodules=True) + version('3.2.0', commit='2bdd28e87224558060e27da90f9b6fcfb20dd324', submodules=True) + version('3.1.0', commit='b12de7eeed699d820693fecd6136daff744f21b6', submodules=True) + version('3.0.1', commit='ef638e1cde90275ce7c0e12fc4902c27bcbdeefd', submodules=True) + version('3.0.0', commit='b36b1673b2c6b7ff3126d8261bef0f8f176c7beb', submodules=True) variant('shared', default=True, description='Build shared libraries') variant('static', default=False, description='Build static libraries') + variant('pic', default=True, description='Build position independent code') + variant('install_headers', default=True, description='Install headers') + variant( + 'install_config', default=True, description='Install cmake configuration files' + ) variant('python', default=False, description='Enable Python support') - variant('python_deps', default=False, - description='Install non-critical python dependencies ' - '(may significantly increase spack install time)') - variant('mpi', default=False, - description='Enable support for MPI aggregation') - variant('nccl', default=False, - description='Enable support for wrapping NCCL functions') + variant( + 'python_hatchet', + default=False, + description='Build Python hatchet submodule ' + '(does not conflict with py-hatchet)', + ) + variant( + 'python_line_profiler', + default=False, + description=( + 'Build timemorys extended version of py-line-profiler ' + '(does not conflict with py-line-profiler)' + ), + ) + variant( + 'python_deps', + default=False, + description='Install non-critical python dependencies ' + '(may significantly increase spack install time)', + ) + variant('mpi', default=False, description='Enable support for MPI aggregation') + variant( + 'nccl', default=False, description='Enable support for wrapping NCCL functions' + ) variant('tau', default=False, description='Enable TAU support') variant('papi', default=False, description='Enable PAPI support') variant('cuda', default=False, description='Enable CUDA support') @@ -40,67 +66,157 @@ class Timemory(CMakePackage): variant('vtune', default=False, description='Enable VTune support') variant('upcxx', default=False, description='Enable UPC++ support') variant('gotcha', default=False, description='Enable GOTCHA support') - variant('likwid', default=False, description='Enable LIKWID support') + variant( + 'likwid', + default=False, + description='Enable LIKWID CPU marker API support (perfmon)', + ) + variant( + 'likwid_nvmon', + default=False, + description='Enable LIKWID GPU marker API support (nvmon)', + ) variant('caliper', default=False, description='Enable Caliper support') - variant('dyninst', default=False, - description='Build dynamic instrumentation tools') + variant('dyninst', default=False, description='Build dynamic instrumentation tools') variant('examples', default=False, description='Build/install examples') - variant('gperftools', default=False, - description='Enable gperftools support') - variant('kokkos_tools', default=False, - description=('Build generic kokkos-tools libraries, e.g. ' - 'kp_timemory, kp_timemory_filter')) - variant('kokkos_build_config', default=False, - description=('Build pre-configured (i.e. dedicated) kokkos-tools ' - 'libraries, e.g. kp_timemory_cpu_flops')) - variant('cuda_arch', default='auto', description='CUDA architecture name', - values=('auto', 'kepler', 'tesla', 'maxwell', 'pascal', - 'volta', 'turing'), multi=False) - variant('cpu_target', default='auto', - description=('Build for specific cpu architecture (specify ' - 'cpu-model)')) - variant('use_arch', default=False, - description=('Build all of timemory w/ cpu_target architecture ' - 'flags (default: roofline toolkit only)')) - variant('tls_model', default='global-dynamic', - description='Thread-local static model', multi=False, - values=('global-dynamic', 'local-dynamic', 'initial-exec', - 'local-exec')) - variant('lto', default=False, - description='Build w/ link-time optimization') - variant('statistics', default=True, - description=('Build components w/ support for statistics ' - '(min/max/stddev)')) - variant('extra_optimizations', default=True, - description='Build timemory with extra optimization flags') - variant('cxxstd', default='14', description='C++ language standard', - values=('14', '17', '20'), multi=False) - variant('mpip_library', default=False, - description='Build stand-alone timemory-mpip GOTCHA library') + variant('gperftools', default=False, description='Enable gperftools support') + variant( + 'kokkos_tools', + default=False, + description=( + 'Build generic kokkos-tools libraries, e.g. ' + 'kp_timemory, kp_timemory_filter' + ), + ) + variant( + 'kokkos_build_config', + default=False, + description=( + 'Build pre-configured (i.e. dedicated) kokkos-tools ' + 'libraries, e.g. kp_timemory_cpu_flops' + ), + ) + variant( + 'cuda_arch', + default='auto', + description='CUDA architecture name', + values=( + 'auto', + 'kepler', + 'kepler30', + 'kepler32', + 'kepler35', + 'kepler37', + 'tesla', + 'maxwell', + 'maxwell50', + 'maxwell52', + 'maxwell53', + 'pascal', + 'pascal60', + 'pascal61', + 'volta', + 'volta70', + 'volta72', + 'turing', + 'turing75', + 'ampere', + 'ampere80', + 'ampere86', + ), + multi=True, + ) + variant( + 'cpu_target', + default='auto', + description=('Build for specific cpu architecture (specify ' 'cpu-model)'), + ) + variant( + 'use_arch', + default=False, + description=( + 'Build all of timemory w/ cpu_target architecture ' + 'flags (default: roofline toolkit only)' + ), + ) + variant( + 'tls_model', + default='global-dynamic', + description='Thread-local static model', + multi=False, + values=('global-dynamic', 'local-dynamic', 'initial-exec', 'local-exec'), + ) + variant('lto', default=False, description='Build with link-time optimization') + variant( + 'statistics', + default=True, + description=('Build components w/ support for statistics ' '(min/max/stddev)'), + ) + variant( + 'extra_optimizations', + default=True, + description='Build timemory with extra optimization flags', + ) + variant( + 'cxxstd', + default='14', + description='C++ language standard', + values=('14', '17', '20'), + multi=False, + ) + variant( + 'cudastd', + default='14', + description='CUDA language standard', + values=('14', '17'), + multi=False, + ) + variant( + 'unity_build', + default=True, + description='Build with CMAKE_UNITY_BUILD=ON for faster builds ' + 'but larger memory consumption', + ) + variant( + 'mpip_library', + default=False, + description='Build stand-alone timemory-mpip GOTCHA library', + ) variant('ompt', default=False, description=('Enable OpenMP tools support')) - variant('ompt_standalone', default=False, - description=('Enable OpenMP tools support via drop-in ' - 'replacement of libomp/libgomp/libiomp5')) - variant('ompt_llvm', default=False, - description='Enable OpenMP tools support as part of llvm build') - variant('ompt_library', default=False, - description='Build stand-alone timemory-ompt library') - variant('allinea_map', default=False, - description='Enable Allinea ARM-MAP support') - variant('require_packages', default=True, - description=('find_package(...) resulting in NOTFOUND ' - 'generates error')) - - depends_on('cmake@3.11:', type='build') + variant( + 'ompt_library', + default=False, + description='Build stand-alone timemory-ompt library', + ) + variant('allinea_map', default=False, description='Enable Allinea ARM-MAP support') + variant( + 'require_packages', + default=True, + description=('find_package(...) resulting in NOTFOUND ' 'generates error'), + ) + variant( + 'compiler', default=True, description='Enable compiler instrumentation support' + ) + variant( + 'ert', + default=True, + description='Enable extern templates for empirical roofline toolkit (ERT)', + ) extends('python', when='+python') + depends_on('cmake@3.15:', type='build') depends_on('python@3:', when='+python', type=('build', 'run')) - depends_on('py-cython', when='+python', type=('build')) + depends_on('py-cython', when='+python_hatchet', type=('build')) + depends_on('py-cython', when='+python_line_profiler', type=('build')) depends_on('pil', when='+python+python_deps', type=('run')) depends_on('py-numpy', when='+python+python_deps', type=('run')) + depends_on('py-hatchet', when='+python+python_deps', type=('run')) depends_on('py-matplotlib', when='+python+python_deps', type=('run')) - depends_on('py-ipython', when='+python+python_deps', type=('run')) depends_on('py-mpi4py', when='+python+mpi+python_deps', type=('run')) + depends_on('py-pandas', when='+python_deps+python_hatchet', type=('run')) + depends_on('py-pydot', when='+python_deps+python_hatchet', type=('run')) + depends_on('py-pyyaml', when='+python_deps+python_hatchet', type=('run')) + depends_on('py-multiprocess', when='+python_deps+python_hatchet', type=('run')) depends_on('mpi', when='+mpi') depends_on('nccl', when='+nccl') depends_on('tau', when='+tau') @@ -108,117 +224,149 @@ class Timemory(CMakePackage): depends_on('cuda', when='+cuda') depends_on('cuda', when='+cupti') depends_on('upcxx', when='+upcxx') - depends_on('likwid', when='+likwid') + depends_on('likwid', when='+likwid~likwid_nvmon') + depends_on('likwid+cuda', when='+likwid+likwid_nvmon') depends_on('gotcha', when='+gotcha') depends_on('caliper', when='+caliper') depends_on('dyninst', when='+dyninst') depends_on('gperftools', when='+gperftools') depends_on('intel-parallel-studio', when='+vtune') - depends_on('llvm-openmp-ompt+standalone', when='+ompt_standalone') - depends_on('llvm-openmp-ompt~standalone', when='+ompt_llvm') depends_on('arm-forge', when='+allinea_map') - conflicts('+python', when='~shared', - msg='+python requires building shared libraries') + conflicts( + '+python', + when='~shared~static', + msg='+python requires building shared or static libraries', + ) + conflicts( + '~pic', + '~shared+static+python', + msg='Python bindings cannot be be linked to static libs w/o +pic', + ) conflicts('+python_deps', when='~python') conflicts('+cupti', when='~cuda', msg='CUPTI requires CUDA') - conflicts('+kokkos_tools', when='~tools', - msg='+kokkos_tools requires +tools') - conflicts('+kokkos_build_config', when='~tools', - msg='+kokkos_build_config requires +tools') - conflicts('+kokkos_build_config', when='~kokkos_tools', - msg='+kokkos_build_config requires +kokkos_tools') - conflicts('tls_model=local-dynamic', when='+python', - msg='+python require tls_model=global-dynamic') - conflicts('tls_model=initial-exec', when='+python', - msg='+python require tls_model=global-dynamic') - conflicts('tls_model=local-exec', when='+python', - msg='+python require tls_model=global-dynamic') - conflicts('+nccl', when='~gotcha', - msg='+nccl requires +gotcha') + conflicts('+kokkos_tools', when='~tools', msg='+kokkos_tools requires +tools') + conflicts( + '+kokkos_build_config', + when='~tools~kokkos_tools', + msg='+kokkos_build_config requires +tools+kokkos_tools', + ) + conflicts( + 'tls_model=local-dynamic', + when='+python', + msg='+python require tls_model=global-dynamic', + ) + conflicts( + 'tls_model=initial-exec', + when='+python', + msg='+python require tls_model=global-dynamic', + ) + conflicts( + 'tls_model=local-exec', + when='+python', + msg='+python require tls_model=global-dynamic', + ) + conflicts('+nccl', when='~gotcha', msg='+nccl requires +gotcha') + conflicts( + '+nccl', + when='~shared~static', + msg='+nccl requires building shared or static libraries', + ) conflicts('+mpip_library', when='~mpi', msg='+mpip_library requires +mpi') - conflicts('+mpip_library', when='~gotcha', - msg='+mpip_library requires +gotcha') - conflicts('+mpip_library', when='~shared', - msg='+mpip_library requires building shared libraries') - conflicts('+ompt_standalone', when='~ompt', - msg='+ompt_standalone requires +ompt') - conflicts('+ompt_llvm', when='~ompt', - msg='+ompt_llvm requires +ompt') - conflicts('+ompt_library', when='~ompt', - msg='+ompt_library requires +ompt') - conflicts('+ompt_library', when='~shared~static', - msg='+ompt_library requires building shared or static libraries') - conflicts('+ompt_standalone+ompt_llvm', - msg=('+ompt_standalone and +ompt_llvm are not compatible. Use ' - '+ompt_llvm~ompt_standalone if building LLVM, use ' - '~ompt_llvm+ompt_standalone if ompt.h is not provided by ' - 'the compiler')) + conflicts('+mpip_library', when='~gotcha', msg='+mpip_library requires +gotcha') + conflicts( + '+mpip_library', + when='~shared~static', + msg='+mpip_library requires building shared or static libraries', + ) + conflicts('+ompt_library', when='~ompt', msg='+ompt_library requires +ompt') + conflicts( + '+ompt_library', + when='~shared~static', + msg='+ompt_library requires building shared or static libraries', + ) + conflicts('+likwid_nvmon', when='~likwid', msg='+likwid_nvmon requires +likwid') def cmake_args(self): spec = self.spec args = [ - '-DTIMEMORY_BUILD_PYTHON=ON', - '-DTIMEMORY_BUILD_TESTING=OFF', - '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON', + self.define('SPACK_BUILD', True), + self.define('TIMEMORY_BUILD_OMPT', False), # disable submodule + self.define('TIMEMORY_BUILD_PYTHON', True), + self.define('TIMEMORY_BUILD_GOTCHA', False), # disable submodule + self.define('TIMEMORY_BUILD_CALIPER', False), # disable submodule + self.define('TIMEMORY_BUILD_TESTING', False), + self.define('TIMEMORY_USE_MPI_LINK_FLAGS', False), + self.define('CMAKE_INSTALL_RPATH_USE_LINK_PATH', True), + self.define_from_variant('BUILD_SHARED_LIBS', 'shared'), + self.define_from_variant('BUILD_STATIC_LIBS', 'static'), + self.define_from_variant('CMAKE_CXX_STANDARD', 'cxxstd'), + self.define_from_variant('CMAKE_CUDA_STANDARD', 'cudastd'), + self.define_from_variant('CMAKE_POSITION_INDEPENDENT_CODE', 'pic'), + self.define_from_variant('CpuArch_TARGET', 'cpu_target'), + self.define_from_variant('TIMEMORY_TLS_MODEL', 'tls_model'), + self.define_from_variant('TIMEMORY_UNITY_BUILD', 'unity_build'), + self.define_from_variant('TIMEMORY_REQUIRE_PACKAGES', 'require_packages'), + self.define_from_variant('TIMEMORY_INSTALL_HEADERS', 'install_headers'), + self.define_from_variant('TIMEMORY_INSTALL_CONFIG', 'install_config'), + self.define_from_variant('TIMEMORY_BUILD_ERT', 'ert'), + self.define_from_variant( + 'TIMEMORY_BUILD_COMPILER_INSTRUMENTATION', 'compiler' + ), + self.define_from_variant('TIMEMORY_BUILD_LTO', 'lto'), + self.define_from_variant('TIMEMORY_BUILD_TOOLS', 'tools'), + self.define_from_variant('TIMEMORY_BUILD_EXAMPLES', 'examples'), + self.define_from_variant('TIMEMORY_BUILD_NCCLP_LIBRARY', 'nccl'), + self.define_from_variant('TIMEMORY_BUILD_MALLOCP_LIBRARY', 'gotcha'), + self.define_from_variant('TIMEMORY_BUILD_MPIP_LIBRARY', 'mpip_library'), + self.define_from_variant('TIMEMORY_BUILD_OMPT_LIBRARY', 'ompt_library'), + self.define_from_variant('TIMEMORY_BUILD_KOKKOS_TOOLS', 'kokkos_tools'), + self.define_from_variant( + 'TIMEMORY_BUILD_KOKKOS_CONFIG', 'kokkos_build_config' + ), + self.define_from_variant( + 'TIMEMORY_BUILD_EXTRA_OPTIMIZATIONS', 'extra_optimizations' + ), + self.define_from_variant('TIMEMORY_BUILD_PYTHON_HATCHET', 'python_hatchet'), + self.define_from_variant( + 'TIMEMORY_BUILD_PYTHON_LINE_PROFILER', 'python_line_profiler' + ), + self.define_from_variant('TIMEMORY_USE_MPI', 'mpi'), + self.define_from_variant('TIMEMORY_USE_TAU', 'tau'), + self.define_from_variant('TIMEMORY_USE_ARCH', 'use_arch'), + self.define_from_variant('TIMEMORY_USE_PAPI', 'papi'), + self.define_from_variant('TIMEMORY_USE_OMPT', 'ompt'), + self.define_from_variant('TIMEMORY_USE_CUDA', 'cuda'), + self.define_from_variant('TIMEMORY_USE_NCCL', 'nccl'), + self.define_from_variant('TIMEMORY_USE_CUPTI', 'cupti'), + self.define_from_variant('TIMEMORY_USE_VTUNE', 'vtune'), + self.define_from_variant('TIMEMORY_USE_UPCXX', 'upcxx'), + self.define_from_variant('TIMEMORY_USE_PYTHON', 'python'), + self.define_from_variant('TIMEMORY_USE_GOTCHA', 'gotcha'), + self.define_from_variant('TIMEMORY_USE_LIKWID', 'likwid'), + self.define_from_variant('TIMEMORY_USE_LIKWID_PERFMON', 'likwid'), + self.define_from_variant('TIMEMORY_USE_LIKWID_NVMON', 'likwid_nvmon'), + self.define_from_variant('TIMEMORY_USE_DYNINST', 'dyninst'), + self.define_from_variant('TIMEMORY_USE_CALIPER', 'caliper'), + self.define_from_variant('TIMEMORY_USE_GPERFTOOLS', 'gperftools'), + self.define_from_variant('TIMEMORY_USE_STATISTICS', 'statistics'), + self.define_from_variant('TIMEMORY_USE_ALLINEA_MAP', 'allinea_map'), ] - cxxstd = spec.variants['cxxstd'].value - args.append('-DCMAKE_CXX_STANDARD={0}'.format(cxxstd)) - - tls = spec.variants['tls_model'].value - args.append('-DTIMEMORY_TLS_MODEL={0}'.format(tls)) - if '+python' in spec: - args.append('-DPYTHON_EXECUTABLE={0}'.format( - spec['python'].command.path)) - - if '+nccl' in spec: - args.append('-DTIMEMORY_USE_NCCL=ON') - args.append('-DTIMEMORY_BUILD_NCCLP_LIBRARY=ON') + pyexe = spec['python'].command.path + args.append(self.define('PYTHON_EXECUTABLE=', pyexe)) + args.append(self.define('Python3_EXECUTABLE', pyexe)) if '+mpi' in spec: - args.append('-DTIMEMORY_USE_MPI_LINK_FLAGS=OFF') - args.append('-DMPI_C_COMPILER={0}'.format(spec['mpi'].mpicc)) - args.append('-DMPI_CXX_COMPILER={0}'.format(spec['mpi'].mpicxx)) + args.append(self.define('MPI_C_COMPILER', spec['mpi'].mpicc)) + args.append(self.define('MPI_CXX_COMPILER', spec['mpi'].mpicxx)) if '+cuda' in spec: - targ = spec.variants['cuda_arch'].value - key = '' if spec.satisfies('@:3.0.1') else 'TIMEMORY_' # newer versions use 'TIMEMORY_CUDA_ARCH' - args.append('-D{0}CUDA_ARCH={1}'.format(key, targ)) - - cpu_target = spec.variants['cpu_target'].value - if cpu_target == 'auto': - args.append('-DCpuArch_TARGET={0}'.format(cpu_target)) - - # forced disabling of submodule builds - for dep in ('caliper', 'gotcha', 'ompt'): - args.append('-DTIMEMORY_BUILD_{0}=OFF'.format(dep.upper())) - - # spack options which translate to TIMEMORY_